3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-25 10:25:01 +00:00

added support for emoji ids on emojiinfo command

This commit is contained in:
Almeida 2021-05-10 12:23:57 +01:00 committed by almeidx
parent 20538c17eb
commit 9fc8783440
3 changed files with 18 additions and 18 deletions

View file

@ -0,0 +1,6 @@
const customEmojiRegex = /(?:<a?:[a-z0-9_]{2,32}:)?([1-9]\d+)>?/i;
export function getCustomEmojiId(str: string): string | null {
const emojiIdMatch = str.match(customEmojiRegex);
return emojiIdMatch?.[1] ?? null;
}