Collector not replying on pressing on choices of a select menu
26 Replies
- 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 OPadd fetchReply:true when replying
add fetchReply:true when replying
It still says "This Interaction Failed"
Check if your collector fires at all
Using console.log?
Let me
I added a console.log in collector outside if statement and everytime I click on a select menu choice, collector does fire
Then debug your if statements
The first 2 checks will always be truthy so those can be removed
I don't see any problem with if statements and they even work fine when I use the same code in interactionCreate
But not inside the collector
I also tried getting rid of
if (!interaction.isStringSelectMenu()) return;
Not that one, the interaction && interaction.values
both will always be truthy
That should error too
ok no thats your entire issue
Your original interaction doesnt have any values as its a ChatInputCommandinteraction
The only checking you do with the interaction you collected is the user id
You're not doing anything with the interaction you collected
It's still not working
But I am getting Collector is On message in terminal which means it is a problem with
interaction.values[]
yes because there are no values on a ChatInputCommandInteraction, as i said before
I don't understand that, what do you mean?
.
There is an interaction.reply in every if statement
and how did you name the interaction you collected
.setValue()?
no
In your collector
you named your interaction i didnt you?
Yes
What is the thing that I am missing
then why dont use use it anywhere in your code?
What interaction are you taking about? 😭
The one you collected
The one you named i
Ohhh yes!!!
Where do I use it?
Where you used interaction
Is there an example available?
No
This is pretty basic at this point
You named your collected interaction i
Yet still use the interaction from the slash command
Done 👍🏼
/thank wolvinny