slashcommand button

Hi all, I have this code to allow memebr to submit photo by slashcommand, from my test if I submit 2 times [simulate 2 photo from diffrent member] when I want to accept or reject one of them the button will affect both phots.. for example photo 1 (accept/reject) button photo 2 (accept/reject) button if I click accept button in image 1 both of them will be accpeted and sql query upload both of them... I need to prevent this only 1 image which button I click to upload not all code https://sourceb.in/ocAHWFXGKv
SourceBin
Update Embed
Instantly share your code with the world.
5 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.
Mohamed Al Yousufi
"discord.js": "^14.11.0" node = v20.2.0
Mohamed Al Yousufi
I did an example to check I submit 2 photo like this assume from 2 members when I click Accept both Image will uplaod to database via mysql query
Mohamed Al Yousufi
I got this error in the logs DiscordAPIError[10062]: Unknown interaction requestBody: { files: [], json: { type: 7, data: [Object] } },rawError: { message: 'Unknown interaction', 10062 },code: 10062,status: 404,method: 'POST' and both images uploaded, in fact I click once to the first one only hello
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(…)
Want results from more Discord servers?
Add your server