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
5 Replies
• 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."discord.js": "^14.11.0"
node = v20.2.0
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
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
helloIf 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.