3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 12:25:02 +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 0ec5e37286
commit a9b0902a01
No known key found for this signature in database
GPG key ID: 8558FBFF849BD664
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;
}