Unable to use :person_shrugging: emoji in button?

Anyone know how I can use 🤷 emoji in a button? When I do \:person_shrugging: and copy/paste it into the name field I get � and an error. Here is the code for the button:
new ButtonBuilder()
.setCustomId('button')
.setEmoji({ name: ':person_shrugging:'})
.setStyle(ButtonStyle.Secondary)
new ButtonBuilder()
.setCustomId('button')
.setEmoji({ name: ':person_shrugging:'})
.setStyle(ButtonStyle.Secondary)
The error I get is
DiscordAPIError[50035]: Invalid Form Body
data.components[0].components[1].emoji.name[BUTTON_COMPONENT_INVALID_EMOJI]: Invalid emoji
DiscordAPIError[50035]: Invalid Form Body
data.components[0].components[1].emoji.name[BUTTON_COMPONENT_INVALID_EMOJI]: Invalid emoji
8 Replies
d.js toolkit
d.js toolkit15mo 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! - Marked as resolved by staff
duck
duck15mo ago
the character given from \:person_shrugging: is the correct way :person_shrugging: is invalid please ensure that no miscellaneous characters are in the string alongside 🤷 I'm assuming the error you receive when using this as the name is the same as the one shown if not, please show the error
Jefferado
JefferadoOP15mo ago
i got the � character from copying \:person_shrugging: into my ide and I get the same error as above when I use instead of :person_shrugging: not sure if there is a special code or id or something for this emoji like there is for some specific emojis in discord.py
duck
duck15mo ago
there is not 🤷 is the name of the emoji
Jefferado
JefferadoOP15mo ago
that character gives me character when I copy paste it into my code
duck
duck15mo ago
which is definitely interesting, since it seems that the character just isn't being copied properly, especially since it comes back as � when you paste it here
duck
duck15mo ago
does it behave the same when copying the character when editing your message like so?
No description
duck
duck15mo ago
op left the server without responding :c
Want results from more Discord servers?
Add your server