unknown interaction
Hi guys,
I get the unknown interaction on regular base:'(. See the sourcebin for my error and code. https://srcb.in/N5vxXOPm0c
8 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!npm list discord: ├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├── [email protected]
└─┬ [email protected]
└── [email protected] deduped
node -v:
v22.1.0
like this right?
https://srcb.in/MkK7wRn5X4
this is my inbox.js in events
oke, so basically i have to defer the interactioncreate first:p
i've deferred my interactioncreate, but i get an error at line 5
https://srcb.in/jc3c5QT3dB
Uncaught Exception: DiscordAPIError[10062]: Unknown interaction
at handleErrors (C:\Users\Bernardo\Desktop\Mod-Bot\node_modules@discordjs\rest\dist\index.js:730:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BurstHandler.runRequest (C:\Users\Bernardo\Desktop\Mod-Bot\node_modules@discordjs\rest\dist\index.js:835:23)
at async _REST.request (C:\Users\Bernardo\Desktop\Mod-Bot\node_modules@discordjs\rest\dist\index.js:1278:22)
at async ChatInputCommandInteraction.deferReply (C:\Users\Bernardo\Desktop\Mod-Bot\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:71:5)
at async Object.execute (C:\Users\Bernardo\Desktop\Mod-Bot\src\events\interactionCreate.js:72:9) {
requestBody: { files: undefined, json: { type: 5, data: [Object] } },
rawError: { message: 'Unknown interaction', code: 10062 },
code: 10062,
status: 404,
method: 'POST',
url: 'https://discord.com/api/v10/interactions/1239957431812096001/aW50ZXJhY3Rpb246MTIzOTk1NzQzMTgxMjA5NjAwMTpBUWRYOVhoY2diYXJHWFE2eWxidjFnODhyMExkZ1U2SXg2azFzU3BnR2JJQVh6ZjdPTHN5WEpIWXV1UXZWMTFDQm56b0dRUFdRNG5XZW0weFRFc3NqdnZBREVKMzZWVTRTbDlWb1lMTVRmeWpkaWVkT1J4QUx2blJvMUp2MzlIMg/callback'
}
Might it be better to put defer and followup within all the commands?
Or only the big ones over 3s?
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
so, ive changed the code so i defer asap in interactioncreate
https://srcb.in/yYstVzgUD3
haha thanks!
so like this right?
https://srcb.in/dv1Zch5g2Y
i still get this error: https://srcb.in/QcLnHSLeKv
its weird, since line 7 still mentions interactionCreate
and now when i do /inbox i get indeed that there was an error while ..
in discord
Yeah but i’ve added interaction.deferupdate
So the first message should be updaten then right?
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
So, basically something like this: https://srcb.in/wYG6GT6kti