DiscordAPIError[10062]: Unknown interaction

await interaction.deferReply();

const embed = new EmbedBuilder()
.setDescription(`\`🏓\` | **Pong:** \`${Math.round(client.ws.ping)}ms\``)
.setColor(client.color.get(interaction.guild.id));

return interaction.editReply({ embeds: [embed], ephemeral: true });
await interaction.deferReply();

const embed = new EmbedBuilder()
.setDescription(`\`🏓\` | **Pong:** \`${Math.round(client.ws.ping)}ms\``)
.setColor(client.color.get(interaction.guild.id));

return interaction.editReply({ embeds: [embed], ephemeral: true });
[AntiCrash] | [UnhandledRejection_Logs] | [start] : ===============
Unhandled Rejection at: Promise {
<rejected> DiscordAPIError[10062]: Unknown interaction
at handleErrors (/home/pi/PanaisTest/node_modules/@discordjs/rest/dist/index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BurstHandler.runRequest (/home/pi/PanaisTest/node_modules/@discordjs/rest/dist/index.js:826:23)
at async _REST.request (/home/pi/PanaisTest/node_modules/@discordjs/rest/dist/index.js:1266:22)
at async ChatInputCommandInteraction.deferReply (/home/pi/PanaisTest/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:69:5)
at async Object.run (/home/pi/PanaisTest/src/commands/Slash/Information/Ping.js:28:16) {
requestBody: { files: undefined, json: [Object] },
rawError: { message: 'Unknown interaction', code: 10062 },
code: 10062,
status: 404,
method: 'POST',
url: 'https://discord.com/api/v10/interactions/1212140133776891904/aW50ZXJhY3Rpb246MTIxMjE0MDEzMzc3Njg5MTkwNDpMNkRoUEJjUTFqdGdKR1NUckFNMlFnQjJCOUR2ODRqNXhMbmJhRkk0NDlsWE55dlViZHNYN25KemN0UkowblRpcVZSeUhZY0dnOG9mZTBOMUVrRGFrVWprZ2c3dHBkOGttRWFUUUFpOTRNaHBVUUFYQ0lFMUI2MGtuYnYxYWI0cA/callback'
}
} reason: DiscordAPIError[10062]: Unknown interaction
at handleErrors (/home/pi/PanaisTest/node_modules/@discordjs/rest/dist/index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BurstHandler.runRequest (/home/pi/PanaisTest/node_modules/@discordjs/rest/dist/index.js:826:23)
at async _REST.request (/home/pi/PanaisTest/node_modules/@discordjs/rest/dist/index.js:1266:22)
at async ChatInputCommandInteraction.deferReply (/home/pi/PanaisTest/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:69:5)
at async Object.run (/home/pi/PanaisTest/src/commands/Slash/Information/Ping.js:28:16) {
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/1212140133776891904/aW50ZXJhY3Rpb246MTIxMjE0MDEzMzc3Njg5MTkwNDpMNkRoUEJjUTFqdGdKR1NUckFNMlFnQjJCOUR2ODRqNXhMbmJhRkk0NDlsWE55dlViZHNYN25KemN0UkowblRpcVZSeUhZY0dnOG9mZTBOMUVrRGFrVWprZ2c3dHBkOGttRWFUUUFpOTRNaHBVUUFYQ0lFMUI2MGtuYnYxYWI0cA/callback'
}
[AntiCrash] | [UnhandledRejection_Logs] | [start] : ===============
Unhandled Rejection at: Promise {
<rejected> DiscordAPIError[10062]: Unknown interaction
at handleErrors (/home/pi/PanaisTest/node_modules/@discordjs/rest/dist/index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BurstHandler.runRequest (/home/pi/PanaisTest/node_modules/@discordjs/rest/dist/index.js:826:23)
at async _REST.request (/home/pi/PanaisTest/node_modules/@discordjs/rest/dist/index.js:1266:22)
at async ChatInputCommandInteraction.deferReply (/home/pi/PanaisTest/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:69:5)
at async Object.run (/home/pi/PanaisTest/src/commands/Slash/Information/Ping.js:28:16) {
requestBody: { files: undefined, json: [Object] },
rawError: { message: 'Unknown interaction', code: 10062 },
code: 10062,
status: 404,
method: 'POST',
url: 'https://discord.com/api/v10/interactions/1212140133776891904/aW50ZXJhY3Rpb246MTIxMjE0MDEzMzc3Njg5MTkwNDpMNkRoUEJjUTFqdGdKR1NUckFNMlFnQjJCOUR2ODRqNXhMbmJhRkk0NDlsWE55dlViZHNYN25KemN0UkowblRpcVZSeUhZY0dnOG9mZTBOMUVrRGFrVWprZ2c3dHBkOGttRWFUUUFpOTRNaHBVUUFYQ0lFMUI2MGtuYnYxYWI0cA/callback'
}
} reason: DiscordAPIError[10062]: Unknown interaction
at handleErrors (/home/pi/PanaisTest/node_modules/@discordjs/rest/dist/index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BurstHandler.runRequest (/home/pi/PanaisTest/node_modules/@discordjs/rest/dist/index.js:826:23)
at async _REST.request (/home/pi/PanaisTest/node_modules/@discordjs/rest/dist/index.js:1266:22)
at async ChatInputCommandInteraction.deferReply (/home/pi/PanaisTest/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:69:5)
at async Object.run (/home/pi/PanaisTest/src/commands/Slash/Information/Ping.js:28:16) {
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/1212140133776891904/aW50ZXJhY3Rpb246MTIxMjE0MDEzMzc3Njg5MTkwNDpMNkRoUEJjUTFqdGdKR1NUckFNMlFnQjJCOUR2ODRqNXhMbmJhRkk0NDlsWE55dlViZHNYN25KemN0UkowblRpcVZSeUhZY0dnOG9mZTBOMUVrRGFrVWprZ2c3dHBkOGttRWFUUUFpOTRNaHBVUUFYQ0lFMUI2MGtuYnYxYWI0cA/callback'
}
So I explain myself before someone tells me something, initially I use reply except that overnight my bot these to no longer respond with the error of the bot exceeding 3 seconds of non-response so I used deferReply instead to see if it responded, it acts exactly the same on every order Discord support tells me there are no API issues Nis no ratelimit applied to the bot While this passes it the bot never had them worries for months and overnight while I made no changes to the code plus no response
6 Replies
d.js toolkit
d.js toolkit9mo 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!
Mark
Mark9mo ago
if it's taking longer than 3 seconds to reply (or defer, which is also a reply), and that's the entirety of your code, it's taking longer than 3 seconds to reply/defer. it could certainly be a network issue, either on your host's end or discord's
LucasB25
LucasB25OP9mo ago
the problem is that I have another bot on the same network and same machine that react without worries @QjuhI applied what you tell me, yet it makes exactly the same mistake And the bot responds well to my other account but that on some servers
LucasB25
LucasB25OP9mo ago
No description
No description
No description
No description
LucasB25
LucasB25OP9mo ago
I clearly doubt that it comes from my code, I tested with two different counts, my main one that never had a response from the bot. My second account has answers from the Bot but that on some discord servers
kiquita
kiquita8mo ago
Same issue with buttons here
Want results from more Discord servers?
Add your server