MessageComponentCollector not working

when i am try to create collector for second time its notworking i have edited pre message and updated components to new components and then created a collector which is not working
18 Replies
d.js toolkit
d.js toolkit6mo 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
treble/luna
treble/luna6mo ago
#how-to-get-help
NotUnknown
NotUnknown6mo ago
No description
d.js docs
d.js docs6mo 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(…)
NotUnknown
NotUnknown6mo ago
no errros i tried but didn't work either
treble/luna
treble/luna6mo ago
well
NotUnknown
NotUnknown6mo ago
No description
treble/luna
treble/luna6mo ago
you will face more errors by using that so call it in the message
NotUnknown
NotUnknown6mo ago
i did but didn't work
treble/luna
treble/luna6mo ago
then remove your filter and see if you receive any interactions ah wait what is message defined as
NotUnknown
NotUnknown6mo ago
its a function where previous message is passed as message
NotUnknown
NotUnknown6mo ago
No description
No description
treble/luna
treble/luna6mo ago
If its a message from your bot then yes it wont work Since you're checking if the user that pressed the button is your bot
NotUnknown
NotUnknown6mo ago
for bot??
treble/luna
treble/luna6mo ago
bots cannot press buttons
NotUnknown
NotUnknown6mo ago
ohhhh got it thanks you your time mate 🍻
treble/luna
treble/luna6mo ago
you have to replace message.author.id with the id of the user you expect the button to press
NotUnknown
NotUnknown6mo ago
okz