DiscordAPIError[10062]: Unknown interaction

Hello guys, I just updated to v14 version and I'm trying to do a store command using buttons My problem is that when 2 commands with buttons and collectors are executed, it throws an error Here is the error:
throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
^

DiscordAPIError[10062]: Unknown interaction
at handleErrors (C:\Users\Tesk-PC\Desktop\+\Programation\Katness Bot v1.95\node_modules\@discordjs\rest\dist\index.js:640:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BurstHandler.runRequest (C:\Users\Tesk-PC\Desktop\+\Programation\Katness Bot v1.95\node_modules\@discordjs\rest\dist\index.js:736:23)
at async REST.request (C:\Users\Tesk-PC\Desktop\+\Programation\Katness Bot v1.95\node_modules\@discordjs\rest\dist\index.js:1387:22)
at async ButtonInteraction.deferUpdate (C:\Users\Tesk-PC\Desktop\+\Programation\Katness Bot v1.95\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:200:5)
at async InteractionCollector.<anonymous> (C:\Users\Tesk-PC\Desktop\+\Programation\Katness Bot v1.95\commands\shop.js:84:9) {
requestBody: { files: undefined, json: { type: 6 } },
rawError: { message: 'Unknown interaction', code: 10062 },
code: 10062,
status: 404,
method: 'POST',
url: 'https://discord.com/api/v10/interactions/1128468903140536433/aW50ZXJhY3Rpb246MTEyODQ2ODkwMzE0MDUzNjQzMzp4ekZUUG9WMEN4N0huaTA1Q0EzNmpjcmh4Ukx6dTZHbGJlUDI0bk5ubTV0bFAzYjV0bWZBZzhUYnBwemZyMm9vb1p1UHhYZHI5NUNpamM5Z3lkM2NsZVRDVkcyVVlRRGFoeUVOamd5TFVKZ3dEMVNsWTRaWG9YckpMeUM0Q2hRMw/callback'
}

Node.js v18.15.0
throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);
^

DiscordAPIError[10062]: Unknown interaction
at handleErrors (C:\Users\Tesk-PC\Desktop\+\Programation\Katness Bot v1.95\node_modules\@discordjs\rest\dist\index.js:640:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BurstHandler.runRequest (C:\Users\Tesk-PC\Desktop\+\Programation\Katness Bot v1.95\node_modules\@discordjs\rest\dist\index.js:736:23)
at async REST.request (C:\Users\Tesk-PC\Desktop\+\Programation\Katness Bot v1.95\node_modules\@discordjs\rest\dist\index.js:1387:22)
at async ButtonInteraction.deferUpdate (C:\Users\Tesk-PC\Desktop\+\Programation\Katness Bot v1.95\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:200:5)
at async InteractionCollector.<anonymous> (C:\Users\Tesk-PC\Desktop\+\Programation\Katness Bot v1.95\commands\shop.js:84:9) {
requestBody: { files: undefined, json: { type: 6 } },
rawError: { message: 'Unknown interaction', code: 10062 },
code: 10062,
status: 404,
method: 'POST',
url: 'https://discord.com/api/v10/interactions/1128468903140536433/aW50ZXJhY3Rpb246MTEyODQ2ODkwMzE0MDUzNjQzMzp4ekZUUG9WMEN4N0huaTA1Q0EzNmpjcmh4Ukx6dTZHbGJlUDI0bk5ubTV0bFAzYjV0bWZBZzhUYnBwemZyMm9vb1p1UHhYZHI5NUNpamM5Z3lkM2NsZVRDVkcyVVlRRGFoeUVOamd5TFVKZ3dEMVNsWTRaWG9YckpMeUM0Q2hRMw/callback'
}

Node.js v18.15.0
discord.js: ^14.11.0 Parts of my code below:
13 Replies
d.js toolkit
d.js toolkit17mo 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.
Tésk
TéskOP17mo ago
Tésk
TéskOP17mo ago
Tésk
TéskOP17mo ago
Tésk
TéskOP17mo ago
Tésk
TéskOP17mo ago
cookieCat
SpecialSauce
SpecialSauce17mo ago
What is shop.js line 84?
Tésk
TéskOP17mo ago
the name of the command as I said I'm doing a store cookieCat
SpecialSauce
SpecialSauce17mo ago
…. I’m attempting to figure out where the error is coming from. If you could direct me to line 84 of that file and show it here that would be appreciated.
Tésk
TéskOP17mo ago
I'm sorry for being late
Tésk
TéskOP17mo ago
@specialsauce Sorry my english is not the best, I didn't understand it well before
Tésk
TéskOP17mo ago
if i remove button.deferUpdate(); the problem stops, but without deferUpgrade the buttons are horrible to use
Tésk
TéskOP17mo ago
From what I understood the collector was collecting all messages with buttons in the text channel, generating an error I solved my problem by creating a filter to filter the id of the message sent by the bot, simple as that:
Want results from more Discord servers?
Add your server