Handling StringSelectMenuInteraction

const value = menu.values[0];
const value = menu.values[0];
This is how I read the current selected value from a <StringSelectMenuCopmonent>. I receive an error stating menu.values is undefined. Why is that?
6 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.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DanielBA
DanielBAOP2y ago
const message = interaction.message;
const row2 = ActionRowBuilder.from(message.components[1]);
const menu = StringSelectMenuBuilder.from(row2.components[0]);
const message = interaction.message;
const row2 = ActionRowBuilder.from(message.components[1]);
const menu = StringSelectMenuBuilder.from(row2.components[0]);
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs2y ago
property SelectMenuBuilder#data The API data associated with this component
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server