Issues with two collectors

Howdy, I have a parent interaction with buttons and what not. I have another interaction that responds to the buttons with a confirmation. Both use collectors but the parent interaction's collector is overriding the child's interaction and I don't want this to be happening.
No description
4 Replies
d.js toolkit
d.js toolkit10mo 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!
duck
duck10mo ago
what exactly do you mean by 'overriding the child's interaction'? do you mean that the parent interaction collector is collecting and responding to interactions that should only be handled by the child interaction collector? could you share your code?
Max
Max10mo ago
unsure what exactly you mean but you may need to filter the interactions by message id when using the collector
d.js docs
d.js docs10mo ago
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(…)
- <Channel>.createMessageComponentCollector(…)
+ <Message>.createMessageComponentCollector(…)