[CLOSED] Question regarding Unicode and Custom emojis

Hi! Anyone knows if discord.js offers a way to check if an emoji/string is a valid discord unicode emoji and not a custom one? The only solution I found so far is by checking if this emoji map contains the emoji string: https://gist.github.com/Vexs/629488c4bb4126ad2a9909309ed6bd71 What is a better way to do this? Much love! <:Panda_Love:1116299125705687062>
Gist
Discord emoji mapping. This is a JSON file! Please load it with jso...
Discord emoji mapping. This is a JSON file! Please load it with json. Attempting to copy-paste it directly into python will not work! For diversity, see: https://gist.github.com/Vexs/9e4c14d4116159...
6 Replies
d.js toolkit
d.js toolkit16mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
Yuuki | ユウキ
Yuuki | ユウキOP16mo ago
Yeah, I'm sorry. I was talking about guild emojis using the format you mentioned. My question is how could I check if an emoji is a valid discord unicode emoji like :fire: :one: and so on?
Yuuki | ユウキ
Yuuki | ユウキOP16mo ago
Wait, you are actually right.
d.js docs
d.js docs16mo ago
- For unicode emojis (twemoji): learn more - Custom emojis: /<?(a)?:?(\w{2,32}):(\d{17,19})>?/ learn more
Yuuki | ユウキ
Yuuki | ユウキOP16mo ago
I guess I could just do a regex / length check to see if it is a normal unicode emoji or a guild emoji. Oh yeah. Thanks!
Want results from more Discord servers?
Add your server