Unknown Interaction for buttons

Hey, im trying to create a message wich has buttons but it doesnt work. Sometimes it works and sometimes not. I get the error unknown interaction on a line which says
await interaction.deferReply();
await interaction.deferReply();
. How can that be? My Discord.js version: [email protected] . My node version: 18.12.0
7 Replies
d.js toolkit
d.js toolkit16mo ago
- 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!
McSimi.js
McSimi.jsOP16mo ago
File i get error in
McSimi.js
McSimi.jsOP16mo ago
Error:
d.js docs
d.js docs16mo ago
Common causes of DiscordAPIError[10062]: Unknown interaction: - Initial response took more than 3 seconds ➞ defer the response *. - Wrong interaction object inside a collector. * Note: you cannot defer modal or autocomplete value responses
McSimi.js
McSimi.jsOP16mo ago
DiscordAPIError[10062]: Unknown interaction
at handleErrors (C:\Users\Simon\VSCode\super-neccecary\DISCORD\SimiBot\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\Simon\VSCode\super-neccecary\DISCORD\SimiBot\node_modules\@discordjs\rest\dist\index.js:736:23)
at async REST.request (C:\Users\Simon\VSCode\super-neccecary\DISCORD\SimiBot\node_modules\@discordjs\rest\dist\index.js:1387:22)
at async ChatInputCommandInteraction.deferReply (C:\Users\Simon\VSCode\super-neccecary\DISCORD\SimiBot\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:69:5)
at async Object.callback (C:\Users\Simon\VSCode\super-neccecary\DISCORD\SimiBot\src\commands\suggestion\suggest.js:41:5)
at async module.exports (C:\Users\Simon\VSCode\super-neccecary\DISCORD\SimiBot\src\events\interactionCreate\handleCommands.js:49:1)
at async Client.<anonymous> (C:\Users\Simon\VSCode\super-neccecary\DISCORD\SimiBot\src\handlers\eventHandler.js:17:5) {
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/1136329200928817222/aW50ZXJhY3Rpb246MTEzNjMyOTIwMDkyODgxNzIyMjpmVThxQk41WVd3eExDaEozRmVVMlk5NGNYYTFFa2Z4cTUxdWFFZTBleXFYdURKbTR6RVhTUmY1MmxnTDIxQWdtWjBaTWZtR0p3SmtnR1N2dG4wUVVyMEZqSHBaQ3FYMjN2bUJKbGZ5N0VqbmYyYTZTSUw1aWRVMFI3Q1pCTVRpTw/callback'
}
DiscordAPIError[10062]: Unknown interaction
at handleErrors (C:\Users\Simon\VSCode\super-neccecary\DISCORD\SimiBot\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\Simon\VSCode\super-neccecary\DISCORD\SimiBot\node_modules\@discordjs\rest\dist\index.js:736:23)
at async REST.request (C:\Users\Simon\VSCode\super-neccecary\DISCORD\SimiBot\node_modules\@discordjs\rest\dist\index.js:1387:22)
at async ChatInputCommandInteraction.deferReply (C:\Users\Simon\VSCode\super-neccecary\DISCORD\SimiBot\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:69:5)
at async Object.callback (C:\Users\Simon\VSCode\super-neccecary\DISCORD\SimiBot\src\commands\suggestion\suggest.js:41:5)
at async module.exports (C:\Users\Simon\VSCode\super-neccecary\DISCORD\SimiBot\src\events\interactionCreate\handleCommands.js:49:1)
at async Client.<anonymous> (C:\Users\Simon\VSCode\super-neccecary\DISCORD\SimiBot\src\handlers\eventHandler.js:17:5) {
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/1136329200928817222/aW50ZXJhY3Rpb246MTEzNjMyOTIwMDkyODgxNzIyMjpmVThxQk41WVd3eExDaEozRmVVMlk5NGNYYTFFa2Z4cTUxdWFFZTBleXFYdURKbTR6RVhTUmY1MmxnTDIxQWdtWjBaTWZtR0p3SmtnR1N2dG4wUVVyMEZqSHBaQ3FYMjN2bUJKbGZ5N0VqbmYyYTZTSUw1aWRVMFI3Q1pCTVRpTw/callback'
}
Command Handler file which is called on interactionCreate event:
McSimi.js
McSimi.jsOP16mo ago
I defered the response. the rest of the message either doesnt help me or i dont understand it. maybe its because my server is to slow?
Want results from more Discord servers?
Add your server