adding an Emoji to a button getting "invalid emjoi"
I am trying to make a simple game of chance where you select a "shell" that something is hidden under. I want to put a shell emoji on each button but I cant figure out how too with the ButtonBuilder.setEmoji() command. I am using discord.js v14.14.1
6 Replies
- 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!
- ✅
Marked as resolved by OP- Custom emojis:
\:name:
➞ <a:name:id>
- Twemojis: \:name:
➞ unicode representation
- Emoji picker: WIN
+ .
/ CMD
+ CTRL
+ SPACE
/ CTRL
+ .
- Right-clicking any emoji will not copy its id!🐚
\:shell:
Produces the aboveplacing that in the code
i still get the error data.components[0].components[0].emoji.name[BUTTON_COMPONENT_INVALID_EMOJI]: Invalid emoji
You have to paste the literal emoji
thankyou! dont know why I couldn't find that anywhere. every example i found in the docs just has an id number in a string which does not work.
this works 🙂