#How to avoid interaction listener mixing commands
13 messages · Page 1 of 1 (latest)
• 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.
Don't create listeners in commands. Use collectors.
If you are waiting for button or select menu input from a specific message, don't create the collector on the channel.
• Channel collectors return component interactions for any component within that channel.
- <Channel>.createMessageComponentCollector(…)
+ <Message>.createMessageComponentCollector(…)
So should I change my client.on(interactionCreate.....
for a collector?
Yes
Ok i will try it
I dont find out how should I make the change to collector, changed the listener for the collector with same code inside but now i receive interaction failed when clicking buttons, any idea ? @vapid oracle
i changed to this
returned interaction failed when clicked button
I suppose your message is the command message from user that doesn't have the buttons. You need to use mensaje
that worked, thanks so much sir