Discord · 10062
Discord error 10062: Unknown interaction
Discord gives your bot three seconds to acknowledge a slash command or button press. Miss it, and the interaction is gone by the time your reply arrives.
What you are seeing
discord.js
DiscordAPIError[10062]: Unknown interactiondiscord.py
discord.errors.NotFound: 404 Not Found (error code: 10062): Unknown interactionToo slow to reply
An interaction has to be acknowledged within three seconds. If your command fetches something from a database or another website first, the reply can arrive after the window has closed, and Discord answers it with 10062 while the user sees "The application did not respond".
The fix is to defer: acknowledge straight away, which shows the user a "thinking" message, then do the slow work and edit the reply. A deferred interaction can be answered for up to fifteen minutes.
discord.js
await interaction.deferReply();
const result = await somethingSlow();
await interaction.editReply(`Done: ${result}`);discord.py
await interaction.response.defer()
result = await something_slow()
await interaction.followup.send(f"Done: {result}")Two copies of the bot
If the error is intermittent and your command is fast, check that the bot is not running twice — for example still running on your own computer after you started it on a server. Both copies receive every interaction, one answers first, and the other gets 10062, or 40060 "Interaction has already been acknowledged".
The quickest test is to stop the bot everywhere, start exactly one copy, and try again.
A struggling host
A host that pauses your process, or a machine so overloaded that the event takes seconds to reach your code, eats into the same three seconds. Our servers do not sleep, so an idle bot answers its first command as fast as its hundredth. If a command is quick on your own machine and slow on a server, deferring is still the reliable fix, because it makes the three-second window irrelevant.
FAQ
Questions
Can I defer and then send a normal message?
Yes, but the interaction should still be answered with editReply in discord.js or followup.send in discord.py, or the user is left looking at "thinking" until it times out.
What about buttons and menus?
Same rule, same fix. For a component that only updates the message it is on, use deferUpdate in discord.js or response.defer() in discord.py, then edit the message.