use setEmoji to set no emoji/ remove an emoji from a button
I normally use setEmoji({name: undefined}) when I want to not have an emoji on a button, generally for dynamic button creation. But this stopped working, and started throwing an error
.setEmoji({name: undefined})
*this is what I have previously used up to now
unsure of why this stopped working, I also tried
.setEmoji()
.setEmoji(null)
.setEmoji({})
I've looked on the docs and searched here and people are suggestion different variations of what I listed above, but it none of them seem to work anymore.
Did this option change or get removed?8 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 OPUnknown User•11mo ago
Message Not Public
Sign In & Join Server To View
like I said, it's mostly for dynamic stuff. Also, yes I can see that it says it didn't expect a null value. The latter three were suggestions I saw and wanted to confirm I tested. All I needed to know was if it did indeed change and if there was an alternative available
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
it would be for things like setEmoji(condition ? emoji : null), it was how I dynamically created menus.
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
I wasn't using null, I was using {name: undefined} which worked previously. I wasn't really asking for opinions on my style just if there was a change to that which I guess there was. I'll have to use another method
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View