Button Image

Hello, Is there a way to add an emoji to the button like so: I've been searching for quite a bit on this discord, websites and docs, but I just couldn't find any valuable information that helped me. Any help would be really appreciated, thank you! Piece of code:
const testButton = new ButtonBuilder()
.setCustomId(
`test-custom-id`
)
.setLabel("Test Button")
.setStyle(1)
.setEmoji("triedURL & emojis");
const testButton = new ButtonBuilder()
.setCustomId(
`test-custom-id`
)
.setLabel("Test Button")
.setStyle(1)
.setEmoji("triedURL & emojis");
No description
16 Replies
d.js toolkit
d.js toolkit2mo 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 OP
d.js docs
d.js docs2mo ago
:method: ButtonBuilder#setEmoji() @1.9.0 Sets the emoji to display on this button.
Renoks
RenoksOP2mo ago
I tried the
.setURL
.setURL
too. No luck unfortunately :/
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
Renoks
RenoksOP2mo ago
Right, but of course that pokeball is a custom emoji. I tried adding a custom image to the Emojis of my bot and set that as the ID. That also didn't work.
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
Renoks
RenoksOP2mo ago
I uploaded the emoji to my bot. Then I used the emoji ID to the code.
No description
No description
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
Renoks
RenoksOP2mo ago
No description
Renoks
RenoksOP2mo ago
No emoji 😦
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
Renoks
RenoksOP2mo ago
Just tried this now. Still the same result.
No description
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
Renoks
RenoksOP2mo ago
Oh my days. It's my bad. I was calling the code from a different place 🤦‍♂️ Time to go to sleep. So sorry for taking your time @sïř.jõ 🌈 and I really really appreciate your quick and helpful replies! 💪
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
Renoks
RenoksOP2mo ago
But it does work now
No description
Want results from more Discord servers?
Add your server