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.
No description
No description
10 Replies
d.js toolkit
d.js toolkit6mo 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
duck
duck6mo ago
that'd be because forEach doesn't return anything, therefore addOptions is receiving undefined were you looking for <Collection>.map()?
GameOfFamous
GameOfFamous6mo ago
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
treble/luna
treble/luna6mo ago
why not just use a UserSelectMenu?
GameOfFamous
GameOfFamous6mo ago
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
treble/luna
treble/luna6mo ago
a select menu has a max of 25 choices A UserSelectMenu does not and is searchable
d.js docs
d.js docs6mo ago
class UserSelectMenuBuilder Class used to build select menu components to be sent through the API
GameOfFamous
GameOfFamous6mo ago
Yes but Can i just do a max of 10 peaple in my userselectmenu ?
treble/luna
treble/luna6mo ago
no
GameOfFamous
GameOfFamous6mo ago
so now how can i use a map to do my selectmenuoptions ?