Interaction Collector Not Firing Collect
I'm trying to implement some buttons on a command interaction, and I have successfully added the buttons, but when creating a message component collector, the 'collect' callback is not being called.
I'm creating it as follows:
Am I missing something here?
8 Replies
• 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.how do u know it's not being called ?
also you're not calling it as i can see in the code provided
u have just created the collector
A) yes
B) Because channel is optional according to the typings
C) one sec
I have a log in there
show the part where you listen to it
It does exist, I did verify that
Ah, ok
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.
yeah
also better to create it on the message to avoid memory leaks
Makes sense
That will also get rid of the optionality of the collector
Still doesn't seem to be working. Let me get a more complete code example.
Ah, yea, sorry
Updated code paste error on my part
That fixed it. Thanks for helping me out