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