Adding an emoji in a select menu don't work
Hi , i've got a problem when i try to use a StringSelectMenuBuilder.
When i use it and do all i want , in my .setEmoji.
i always get TypeError: Cannot destructure property 'emoji' of 'selectMenuOption' as it is undefined.
10 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 OPthat'd be because
forEach
doesn't return anything, therefore addOptions
is receiving undefined
were you looking for <Collection>.map()
?Oh , ok , i have all the name (in string ) , of members in a Channel , and i try to add all of them in a select menu , Can you help me to do this ? @duck
why not just use a UserSelectMenu?
Because i don't know how to do it , because i juste want to have in the selection the player who was in my channel
a select menu has a max of 25 choices
A UserSelectMenu does not and is searchable
Yes but Can i just do a max of 10 peaple in my userselectmenu ?
no
so now how can i use a map to do my selectmenuoptions ?