unknown interaction error
hey, i get the below error. I have tried to add an acknowledgement to the interaction, as we get the response from the API, so could take a while, but it still errors.
It's intermittent.
It's intermittent.
await command.execute(interaction);
} catch (error) {
console.error(error);
// Handle errors only if the interaction hasn't been replied or deferred
if (interaction.replied || interaction.deferred) {
await interaction.followUp({ content: 'There was an error while executing this command!', ephemeral: true });
} else {
> await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true });
}
}
});
client.on(Events.InviteDelete, async invite => {
if(!botEnabled()) return;
const guildId = invite.guild.id; await command.execute(interaction);
} catch (error) {
console.error(error);
// Handle errors only if the interaction hasn't been replied or deferred
if (interaction.replied || interaction.deferred) {
await interaction.followUp({ content: 'There was an error while executing this command!', ephemeral: true });
} else {
> await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true });
}
}
});
client.on(Events.InviteDelete, async invite => {
if(!botEnabled()) return;
const guildId = invite.guild.id;DiscordAPIError[10062]: Unknown interaction
at handleErrors (/app/node_modules/@discordjs/rest/dist/index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BurstHandler.runRequest (/app/node_modules/@discordjs/rest/dist/index.js:826:23)
at async _REST.request (/app/node_modules/@discordjs/rest/dist/index.js:1266:22)
at async ChatInputCommandInteraction.deferReply (/app/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:69:5)
at async Object.execute (file:///app/src/commands.js:45:5)
at async Client.<anonymous> (file:///app/src/bot.js:62:3) {
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/1327467424752341022/aW50ZXJhY3Rpb246MTMyNzQ2NzQyNDc1MjM0MTAyMjo3OTdrdXl0RlhESWZjaFM4d01XRm5keGNaNUFwR3FFY0RRbVp6TG1hemt6Tm8wejdtYW1CSWxqUWZHTDJUT2RTdzlSWEU0bHZHQ0g1aHY2cDJjVmJSczRhU3BCMDNncU03akFESzVnczJNNDNWQTl0ZDZsaHBTWkJOb29yOTZ0bQ/callback'
}
DiscordAPIError[10062]: Unknown interaction
at handleErrors (/app/node_modules/@discordjs/rest/dist/index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BurstHandler.runRequest (/app/node_modules/@discordjs/rest/dist/index.js:826:23)
at async _REST.request (/app/node_modules/@discordjs/rest/dist/index.js:1266:22)
at async ChatInputCommandInteraction.reply (/app/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:111:5)
at async Client.<anonymous> (file:///app/src/bot.js:69:4) {
requestBody: { files: [], json: { type: 4, data: [Object] } },
rawError: { message: 'Unknown interaction', code: 10062 },
code: 10062,
status: 404,
method: 'POST',
url: 'https://discord.com/api/v10/interactions/1327467424752341022/aW50ZXJhY3Rpb246MTMyNzQ2NzQyNDc1MjM0MTAyMjo3OTdrdXl0RlhESWZjaFM4d01XRm5keGNaNUFwR3FFY0RRbVp6TG1hemt6Tm8wejdtYW1CSWxqUWZHTDJUT2RTdzlSWEU0bHZHQ0g1aHY2cDJjVmJSczRhU3BCMDNncU03akFESzVnczJNNDNWQTl0ZDZsaHBTWkJOb29yOTZ0bQ/callback'
}DiscordAPIError[10062]: Unknown interaction
at handleErrors (/app/node_modules/@discordjs/rest/dist/index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BurstHandler.runRequest (/app/node_modules/@discordjs/rest/dist/index.js:826:23)
at async _REST.request (/app/node_modules/@discordjs/rest/dist/index.js:1266:22)
at async ChatInputCommandInteraction.deferReply (/app/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:69:5)
at async Object.execute (file:///app/src/commands.js:45:5)
at async Client.<anonymous> (file:///app/src/bot.js:62:3) {
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/1327467424752341022/aW50ZXJhY3Rpb246MTMyNzQ2NzQyNDc1MjM0MTAyMjo3OTdrdXl0RlhESWZjaFM4d01XRm5keGNaNUFwR3FFY0RRbVp6TG1hemt6Tm8wejdtYW1CSWxqUWZHTDJUT2RTdzlSWEU0bHZHQ0g1aHY2cDJjVmJSczRhU3BCMDNncU03akFESzVnczJNNDNWQTl0ZDZsaHBTWkJOb29yOTZ0bQ/callback'
}
DiscordAPIError[10062]: Unknown interaction
at handleErrors (/app/node_modules/@discordjs/rest/dist/index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BurstHandler.runRequest (/app/node_modules/@discordjs/rest/dist/index.js:826:23)
at async _REST.request (/app/node_modules/@discordjs/rest/dist/index.js:1266:22)
at async ChatInputCommandInteraction.reply (/app/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:111:5)
at async Client.<anonymous> (file:///app/src/bot.js:69:4) {
requestBody: { files: [], json: { type: 4, data: [Object] } },
rawError: { message: 'Unknown interaction', code: 10062 },
code: 10062,
status: 404,
method: 'POST',
url: 'https://discord.com/api/v10/interactions/1327467424752341022/aW50ZXJhY3Rpb246MTMyNzQ2NzQyNDc1MjM0MTAyMjo3OTdrdXl0RlhESWZjaFM4d01XRm5keGNaNUFwR3FFY0RRbVp6TG1hemt6Tm8wejdtYW1CSWxqUWZHTDJUT2RTdzlSWEU0bHZHQ0g1aHY2cDJjVmJSczRhU3BCMDNncU03akFESzVnczJNNDNWQTl0ZDZsaHBTWkJOb29yOTZ0bQ/callback'
}