NapNodes

← Discord bot guides

Discord bots · updated 5 November 2026

“The Application Did Not Respond” in Your Discord Bot: Unknown Interaction and How to Fix It

You use one of your bot's commands and Discord answers “The application did not respond” or, on a button, “This interaction failed” (the wording varies a little by language and Discord version). And the console may show Unknown interaction. It's nearly always the same thing: your bot took more than 3 seconds to answer. Here's how to work out which case is yours and how to fix it in discord.py and discord.js.

Why it happens

Discord gives your bot 3 seconds to send the first response to a command, button or menu. If it doesn't arrive in time, Discord shows the user the warning and invalidates that interaction, even if the bot is online and its response goes out a second later.

It doesn't matter that your code is fine: it's enough for it to query a website or a slow database before answering. That's why it tends to happen only sometimes, and why it can work on your PC and not somewhere else.

Rather not set it up yourself? Discord bot hosting from €1.50 a month, no contract and a full refund within 72 hours. Or create a free Discord bot, no card needed.

Check the console: each case means something different

Run the command with the console open and look for what appears right after:

Unknown interaction (code 10062): your bot answered too late. In discord.py it looks like discord.errors.NotFound: 404 Not Found (error code: 10062): Unknown interaction, and in discord.js like DiscordAPIError[10062]: Unknown interaction. Carry on with the next section.

Interaction has already been acknowledged (code 40060): the same thing was answered twice. We explain it further down, and it's often that your bot is running twice.

InteractionResponded in discord.py, or The reply to this interaction has already been sent or deferred. in discord.js: the same, but your library stopped it before it reached Discord.

Nothing at all: your code never gets to answer. The bot may be off, the command may still be registered but no longer exist in your code, or it may fail before responding with nothing logging it.

If it's slow: answer first and finish later

What you need to do is tell Discord you've received the command and then take your time. That's the “… is thinking” message. From there you have 15 minutes to give the final answer. It has to be the first thing the command does, before anything slow:

app.py (discord.py)
@bot.tree.command(name="report", description="Generate the report")
async def report(interaction: discord.Interaction):
    await interaction.response.defer(thinking=True)  # before anything else
    text = await read_data()  # this can take its time now
    await interaction.followup.send(text)
index.js (discord.js)
client.on(Events.InteractionCreate, async (interaction) => {
  if (!interaction.isChatInputCommand()) return;
  if (interaction.commandName === "report") {
    await interaction.deferReply(); // before anything else
    const text = await readData(); // this can take its time now
    await interaction.editReply(text);
  }
});
  1. If the answer is private, say so at the start

    Whether only the command's user sees it is decided when you defer: defer(ephemeral=True) in discord.py and deferReply({ flags: MessageFlags.Ephemeral }) in discord.js.

  2. Answer with the right method

    Once deferred, the normal reply no longer works: use followup.send() in discord.py and editReply() in discord.js.

  3. Pop-up forms are the exception

    A form (modal) has to be the first response: you can't defer and open it afterwards. Show it before doing anything slow.

If it blocks: the failure you can't see

A bot does everything in turns. If one operation stalls it, no other interaction moves forward, which is why commands that have nothing to do with the slow one fail too.

In Python, the usual culprits are time.sleep() and requests.get(). Replace the first with await asyncio.sleep(), use aiohttp instead of requests and, if a function has no async version, run it with await asyncio.to_thread(function). The clue is this warning in the console: heartbeat blocked for more than 10 seconds.

In Node.js, the same goes for huge loops or functions ending in Sync on large data, such as fs.readFileSync or execSync.

If it says “already been acknowledged”: two responses

  1. Check whether your bot is running twice

    This is the first thing to look at. If you left a copy open on your PC and another on a host, both receive the same command and both answer. One wins and the other gets the error. Close one and try again.

  2. Check your try/except and try/catch blocks

    If you answer correctly, something fails right after and the error block tries to answer again, you get 40060. In the error block, first check whether you've already answered: interaction.response.is_done() in discord.py and interaction.replied || interaction.deferred in discord.js.

  3. Don't handle the same thing in two places

    Two client.on handlers or two collectors for the same button answer twice. Keep one.

If it fails on buttons and menus

The 3-second rule is the same. But there's a case of their own: buttons that worked and stop working after the bot restarts. If you handle them with an in-memory view or collector, nobody's listening after a restart, even though the message is still there.

In discord.py, use persistent views: timeout=None, a fixed custom_id on each button and bot.add_view() at startup. In discord.js, handle the button in InteractionCreate by its customId, not with a collector. It's all step by step in buttons and menus in a Discord bot.

If it only happens now and then

If your code defers properly and it still fails occasionally, look at where it's running. On platforms that put programs to sleep, the first command after a while arrives while the bot's waking up (why that happens). And if the machine is short of memory or CPU, 3 seconds go by quickly.

If the warning appears and the bot is off, it's not a code bug: the command stays registered on Discord even with nobody there to answer. My bot isn't responding covers that case and the others.

If your bot is on NapNodes

  1. Check the “Console”

    Run the command and read what appears. That tells you which of the cases above you're in.

  2. Check “Performance”

    If memory or CPU are maxed out when it fails, the bot has no headroom. The free bot has 256 MB; if that's too tight, the Mini (512 MB) and Plus (1 GB) plans give you more.

  3. Keep a single copy

    If it's running here, close the one you left on your PC: two copies with the same token cause error 40060.

  4. Press “Restart”

    Do it after every code change: a bot reads its code when it starts.

Frequently asked questions

Why does my bot say “The application did not respond”?

Because it didn't answer within 3 seconds, or didn't answer at all. If it has slow work to do, defer the response right at the start: interaction.response.defer() in discord.py and interaction.deferReply() in discord.js.

What does Unknown interaction (10062) mean?

That your bot answered after the interaction had expired: the 3 seconds passed with no first response. Fix it by deferring the response at the start.

What does “Interaction has already been acknowledged” (40060) mean?

That the same thing was answered twice. Check whether your bot is running twice (on your PC and on a host) and whether your error block answers after a successful answer.

How long does a bot have to respond?

3 seconds for the first response and, if it defers, 15 minutes for the final one.

Why do my buttons stop working when the bot restarts?

Because something in memory was handling them. Use persistent views in discord.py, or handle the button by its customId in InteractionCreate in discord.js.

Can this error appear with the bot off?

Yes. The command stays registered on Discord even if your program isn't running, and with nobody to answer, the warning appears.

Shall we set it up for you?

Discord bot hosting from €1.50 a month, never oversold: your RAM is yours alone. And if you'd rather start without paying, there's a free Discord bot, no card needed.

Keep reading

All Discord bot guides, sorted →