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 toolkit13mo 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/luna13mo ago
#how-to-get-help
NotUnknown
NotUnknownOP13mo ago
No description
d.js docs
d.js docs13mo 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
NotUnknownOP13mo ago
no errros i tried but didn't work either
treble/luna
treble/luna13mo ago
well
NotUnknown
NotUnknownOP13mo ago
No description
treble/luna
treble/luna13mo ago
you will face more errors by using that so call it in the message
NotUnknown
NotUnknownOP13mo ago
i did but didn't work
treble/luna
treble/luna13mo ago
then remove your filter and see if you receive any interactions ah wait what is message defined as
NotUnknown
NotUnknownOP13mo ago
its a function where previous message is passed as message
NotUnknown
NotUnknownOP13mo ago
No description
No description
treble/luna
treble/luna13mo 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
NotUnknownOP13mo ago
for bot??
treble/luna
treble/luna13mo ago
bots cannot press buttons
NotUnknown
NotUnknownOP13mo ago
ohhhh got it thanks you your time mate 🍻
treble/luna
treble/luna13mo ago
you have to replace message.author.id with the id of the user you expect the button to press
NotUnknown
NotUnknownOP13mo ago
okz
Want results from more Discord servers?
Add your server