zumito-framework 1.1.44 → 1.1.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Client } from "discord.js";
|
|
2
2
|
export declare class EmojiFallback {
|
|
3
3
|
static getEmoji(client: Client, emojiId: string, fallbackEmoji: any): any;
|
|
4
|
+
static getEmojiByName(client: Client, emojiName: string, fallbackEmoji: any): any;
|
|
5
|
+
static getEmojiByIdentifier(client: Client, emojiId: string, fallbackEmoji: any): any;
|
|
4
6
|
}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
export class EmojiFallback {
|
|
2
2
|
static getEmoji(client, emojiId, fallbackEmoji) {
|
|
3
3
|
const emoji = client.emojis.cache.get(emojiId);
|
|
4
|
-
return emoji || fallbackEmoji;
|
|
4
|
+
return emoji?.toString() || fallbackEmoji;
|
|
5
|
+
}
|
|
6
|
+
static getEmojiByName(client, emojiName, fallbackEmoji) {
|
|
7
|
+
const emoji = client.emojis.cache.find(emoji => emoji.name === emojiName);
|
|
8
|
+
return emoji?.toString() || fallbackEmoji;
|
|
9
|
+
}
|
|
10
|
+
static getEmojiByIdentifier(client, emojiId, fallbackEmoji) {
|
|
11
|
+
const emoji = client.emojis.cache.find(emoji => emoji.id === emojiId);
|
|
12
|
+
return emoji?.toString() || fallbackEmoji;
|
|
5
13
|
}
|
|
6
14
|
}
|