Custom Emoji formatting issue

I am trying to use custom emojis from a server I own for my bot. The bot is in this server and has admin perms in a different server plus there are no custom emoji restrictions in the channel where the bot is trying to use the emojis. I have tried many methods to use the emojis. For example:
'<:EMOJI_NAME_HERE:EMOJI_ID_HERE>'
'<:EMOJI_NAME_HERE:EMOJI_ID_HERE>'
Plus
interaction.client.emojis.cache.get("EMOJI_ID_HERE").toString()
interaction.client.emojis.cache.get("EMOJI_ID_HERE").toString()
And
formatEmoji("EMOJI_ID_HERE", false).replace("_", "EMOJI_NAME_HERE")
formatEmoji("EMOJI_ID_HERE", false).replace("_", "EMOJI_NAME_HERE")
Each just ends up in the bot sending the emoji name wrapped around colons. I have triple-checked that the emoji names are correct as well as their ids. Any idea on how to solve this?
4 Replies
d.js toolkit
d.js toolkit17mo 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. - Issue solved? Press the button!
PAdventures
PAdventuresOP17mo ago
Also these emojis are not animated
PAdventures
PAdventuresOP17mo ago
Example of what happens
PAdventures
PAdventuresOP17mo ago
Here is one of the GuildEmoji objects
GuildEmoji {
animated: false,
name: 'yaraWallet',
id: 'EMOJI_ID',
guild: Guild {
GUILD_STUFF_HERE
},
requiresColons: true,
managed: false,
available: true, <-- Emoji can be used by the bot?
_roles: [],
author: null
},
GuildEmoji {
animated: false,
name: 'yaraWallet',
id: 'EMOJI_ID',
guild: Guild {
GUILD_STUFF_HERE
},
requiresColons: true,
managed: false,
available: true, <-- Emoji can be used by the bot?
_roles: [],
author: null
},
Bot also has this GatewayIntentBits.GuildEmojisAndStickers oh the everyone role needed to also have that perm? k solved i guess
Want results from more Discord servers?
Add your server