Discord bot button problem.

Hey guys I am trying to code a disocrd bot with slash-command that allow memebr to submit a screenshot which later on I Will accept it or reject it. In case I accept mysql operation will upload the photo to the db ALL IS GOOD the problem is As you can see from the attached image from terminal once I submit 2 request (2 screenshot.) if I click to any button Accept or reject -> it will accept all of them at the same time or reject!! my goal is to accept or reject each one individually.. any help?? code https://sourceb.in/oYaAGJ7eyY
8 Replies
d.js toolkit
d.js toolkitā€¢17mo ago
ā€¢ 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.
Unknown User
Unknown Userā€¢17mo ago
Message Not Public
Sign In & Join Server To View
Mohamed Al Yousufi
Mohamed Al Yousufiā€¢17mo ago
ok just wait I will update with the full code.. https://sourceb.in/o1qwSnUBVZ here we go šŸ„²
Unknown User
Unknown Userā€¢17mo ago
Message Not Public
Sign In & Join Server To View
Mohamed Al Yousufi
Mohamed Al Yousufiā€¢17mo ago
No I don't want to limit The problem even when I Submit 2 images with different slash command If I click the accept button for the first image the result is -- both images accepted..
Unknown User
Unknown Userā€¢17mo ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docsā€¢17mo 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(ā€¦)
Mohamed Al Yousufi
Mohamed Al Yousufiā€¢17mo ago
Hmm let me try this..
Want results from more Discord servers?
Add your server