nice new update
This commit is contained in:
parent
e136522421
commit
666638c956
136 changed files with 4483 additions and 9190 deletions
11
src/bot/functions/parseEmoji.ts
Normal file
11
src/bot/functions/parseEmoji.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
export default function parseEmoji(input: string | null): string | null {
|
||||
|
||||
if (input === null || input == ' ' || input === ' ') return null;
|
||||
const customEmojiMatch = input.match(/^<:.*:(\d+)>$/);
|
||||
if (customEmojiMatch) return customEmojiMatch[1];
|
||||
|
||||
const unicodeEmojiRegex = /^[\p{Emoji_Presentation}\p{Emoji}\uFE0F]+$/u;
|
||||
if (unicodeEmojiRegex.test(input)) return input;
|
||||
|
||||
return null;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue