Unknown Interaction
Your bot answered a slash command, button or menu too late, or the interaction was already answered elsewhere. Discord discards it and the user sees "The application did not respond".
What You See
DiscordAPIError[10062]: Unknown interaction
DiscordAPIError[40060]: Interaction has already been acknowledged.
discord.errors.NotFound: 404 Not Found (error code: 10062): Unknown interaction
discord.errors.HTTPException: 400 Bad Request (error code: 40060): Interaction has already been acknowledged.
Why It Happens
Discord gives your bot 3 seconds to send a first response to an interaction. After that, the interaction expires and any reply fails with error 10062. The usual reasons:
- Slow work before replying: database query, API call, image generation...
- Two copies of your bot are running with the same token (for example on your computer and on KataBump). Both receive the interaction: one answers, the other gets
10062or40060. - Replying twice to the same interaction (e.g. calling
reply()after already replying): error40060.
Fix: Defer the Reply
If a command may take more than a couple of seconds, defer it first. Discord shows "Bot is thinking..." and you then have up to 15 minutes to send the real answer.
client.on('interactionCreate', async (interaction) => {
if (!interaction.isChatInputCommand()) return;
if (interaction.commandName === 'stats') {
await interaction.deferReply(); // answer within 3 s
const stats = await fetchStatsSlowly(); // take your time
await interaction.editReply(`Stats: ${stats}`);
}
});
@bot.tree.command(name="stats")
async def stats(interaction: discord.Interaction):
await interaction.response.defer() # answer within 3 s
data = await fetch_stats_slowly() # take your time
await interaction.followup.send(f"Stats: {data}")
On the Free plan (25% CPU), heavy commands run slower than on your computer. Deferring makes your bot reliable regardless of the plan.
Fix: Stop Duplicate Instances
Make sure your bot runs in only one place: stop it on your computer while it is hosted on KataBump, and don't run the same token on two KataBump servers. To test changes locally without conflicts, create a second application with its own token.
Fix: Reply Only Once
After the first response, use editReply() / followUp() (discord.js) or interaction.followup.send() (discord.py). You can check the state before answering:
if (interaction.deferred || interaction.replied) {
await interaction.followUp('Done!');
} else {
await interaction.reply('Done!');
}
Check the error index or open a ticket on Discord.