Can someone explain me how to return a value?

I try to return the .setvalue from the select menu That my bot response with the selected Option
No description
18 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!
treble/luna
treble/luna6mo ago
Show your code And elaborate
Nicolas Matheisen
Nicolas MatheisenOP6mo ago
hmm I can't share cause my code is too long any idea how I can share it
d.js docs
d.js docs6mo ago
To share long code snippets, use a service like gist, sourcebin, pastebin, or similar instead of posting them as large code blocks or files.
Nicolas Matheisen
Nicolas MatheisenOP6mo ago
Pastebin
const { SlashCommandBuilder,EmbedBuilder,StringSelectMenuBuilder, S...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Nicolas Matheisen
Nicolas MatheisenOP6mo ago
sry my code is messy but if it's ready I edit it that it look like more professional on line 83 is the problem I try to solve
treble/luna
treble/luna6mo ago
You never define values So yes, that wont work
Nicolas Matheisen
Nicolas MatheisenOP6mo ago
oh I cant use the .setvalue?
treble/luna
treble/luna6mo ago
what are you trying to achieve exactly Your issue is really unclear
Nicolas Matheisen
Nicolas MatheisenOP6mo ago
I want that the user do a choice and then I want return the choice
d.js docs
d.js docs6mo ago
:property: StringSelectMenuInteraction#values @14.15.3 The values selected
Nicolas Matheisen
Nicolas MatheisenOP6mo ago
yeah another one share this link but If I read this I don't realy understand how to solve my problem normaly I use the djs guide website and build from snipet code my bot😅
treble/luna
treble/luna6mo ago
you collect an interaction this is how to access its values
Nicolas Matheisen
Nicolas MatheisenOP6mo ago
interaction.values I need?
treble/luna
treble/luna6mo ago
yes
Nicolas Matheisen
Nicolas MatheisenOP6mo ago
ok... ty
treble/luna
treble/luna6mo ago
also consider naming your collected interaction not interaction it gets confusing
Nicolas Matheisen
Nicolas MatheisenOP6mo ago
hmmm ok I rename this yeah It worked holy shit I am so dumb tyyyy😂🫣🫣🫣🫣
Want results from more Discord servers?
Add your server