How I can crate a handler that responsed to my select menu

I am a beginner In programming and I don't realy know wicht parts I need for the event. I build a dynamically eventhandler (hope that's the right word) Now I open a new ja and at this point I don't know how to do it. Ty for all hints
6 Replies
d.js toolkit
d.js toolkit13mo 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
d.js docs
d.js docs13mo ago
method BaseInteraction#isStringSelectMenu() Indicates whether this interaction is a StringSelectMenuInteraction.
treble/luna
treble/luna13mo ago
Use that typeguard to narrow down the interaction Then handle accordingly and pass it to your file
Nicolas Matheisen
Nicolas MatheisenOP13mo ago
hmm what is meaning the word "typegaurd" it's like interaction.click() ?
treble/luna
treble/luna13mo ago
no Its to narrow down the type If you're a beginner i would really recommend to read #resources first and make sure you understand the basics of js
Nicolas Matheisen
Nicolas MatheisenOP13mo ago
hmm ok I never do this bevor ok I google and try to learn how this work ty 🙂
Want results from more Discord servers?
Add your server