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:
parent
0ec5e37286
commit
a9b0902a01
3 changed files with 18 additions and 18 deletions
|
@ -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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue