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 toolkit2y 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 User2y ago
Message Not Public
Sign In & Join Server To View
Mohamed Al Yousufi
ok just wait I will update with the full code.. https://sourceb.in/o1qwSnUBVZ here we go 🥲
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Mohamed Al Yousufi
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 User2y ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs2y 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
Hmm let me try this..
Want results from more Discord servers?
Add your server