mirror of
https://github.com/stoatchat/javascript-client-sdk.git
synced 2026-07-19 17:13:31 -04:00
chore: emoji changes
This commit is contained in:
@@ -81,6 +81,15 @@ export class Emoji {
|
||||
return this.#collection.getUnderlyingObject(this.id).nsfw;
|
||||
}
|
||||
|
||||
/**
|
||||
* URL to emoji
|
||||
*/
|
||||
get url() {
|
||||
return `${this.#collection.client.configuration?.features.autumn.url}/emojis/${
|
||||
this.id
|
||||
}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete Emoji
|
||||
*/
|
||||
|
||||
@@ -746,6 +746,15 @@ export class Server {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* All emojis tied to this server
|
||||
*/
|
||||
get emojis(): Emoji[] {
|
||||
return this.#collection.client.emojis.filter(
|
||||
(emoji) => emoji.parent.type === "Server" && emoji.parent.id === this.id,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete emoji
|
||||
* @param emojiId Emoji ID
|
||||
|
||||
Reference in New Issue
Block a user