Attaching a select menu to a message

My code:
const select = new StringSelectMenuBuilder()
.setCustomId('Select')
.setPlaceholder('Make a selection!')
.addOptions(
new StringSelectMenuOptionBuilder()
.setLabel('hmm')
.setValue('wassup')
)
const row = new ActionRowBuilder()
.addComponents(select);
return message.channel.send('hi', {components: [row]})
const select = new StringSelectMenuBuilder()
.setCustomId('Select')
.setPlaceholder('Make a selection!')
.addOptions(
new StringSelectMenuOptionBuilder()
.setLabel('hmm')
.setValue('wassup')
)
const row = new ActionRowBuilder()
.addComponents(select);
return message.channel.send('hi', {components: [row]})
When this code runs, my bot only sends "hi" and that's it, no select menu or any component. Can someone help me get the select menu included with the message? Thanks
4 Replies
d.js toolkit
d.js toolkit2y ago
- What's your exact discord.js npm list discord.js and node node -v version? - Post the full error stack trace, not just the top part! - Show your code! - Explain what exactly your issue is. - Not a discord.js issue? Check out #useful-servers. - Issue solved? Press the button!
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Toidi357
Toidi357OP2y ago
❤️ thank you
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server