emoji

How to check if emoji exists before setting it? because if I set it and it doesnt exist it can throw an exception
5 Replies
d.js toolkit
d.js toolkit2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
Deerlo
DeerloOP2y ago
Deerlo
DeerloOP2y ago
config.emojis.ltc is id like '1069686498733076561' if this id wouldnt exist it would throw me an exception I want to do so it ignores emoji if it doesnt exist
edocsil
edocsil2y ago
Emojis are cached with the Guilds intent which means client.emojis.cache.has() can be used to validate IDs Will only work if the emoji is from a guild you are in though. Which is not always required for emojis in buttons
Deerlo
DeerloOP2y ago
okay I will try thank u
Want results from more Discord servers?
Add your server