BotNetwork

Discord bot online but not responding? A troubleshooting checklist

The green dot only proves the gateway connection works. Everything after that, from intents to channel overrides, can silently stop your bot from answering.

Published 4 min read

Step 0: get the error on screen

Most "silent" bots are throwing errors nobody sees. Before anything else:

  • Log every unhandled rejection: process.on("unhandledRejection", console.error) in Node.js, or configure logging in discord.py (discord.utils.setup_logging() or the default handler of client.run).
  • Wrap interaction handlers in try/catch and log the error object, which includes Discord's error code.
  • Check the host's logs, not just your terminal. On Docker: docker compose logs -f.

Then go through the list below in order.

1. Is it actually connected?

Symptom Likely cause
Never comes online, close code 4004 Invalid token. Reset it in the Developer Portal and update the environment variable.
Disconnects immediately, close code 4014 Your code requests a privileged intent that is not enabled in the portal.
Online, then offline after a few minutes The process is crashing or the host is sleeping it. See how to keep a bot online 24/7.
Two copies answer Two instances run with the same token (an old deploy, your laptop). Stop one.

2. Prefix commands: the Message Content intent

If the bot reacts to slash commands but not to !ping, the message text is probably empty. Since Discord made Message Content a privileged intent, a bot without it receives empty content for most messages, except DMs, messages that mention the bot and its own messages.

Fix both sides:

  1. Developer Portal > your app > Bot > enable Message Content Intent.
  2. Request it in code:
const client = new Client({
  intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent],
});
intents = discord.Intents.default()
intents.message_content = True
client = discord.Client(intents=intents)

Better long-term: move to slash commands, which need no privileged intent. Details in Discord gateway intents explained.

3. Slash commands do not appear

  • Not registered. Commands are registered through the API, separately from logging in. Run your deploy script; see slash commands in discord.js v14.
  • Wrong scope. The bot must be invited with both bot and applications.commands. Re-invite with a URL from the permissions calculator; it does not kick the bot.
  • Wrong guild ID. Guild commands registered to your test server do not exist anywhere else.
  • Stale client. Restart the Discord client (Ctrl+R on desktop) after changing commands.
  • Permissions hide them. default_member_permissions or the server's Integrations settings can hide a command from regular members.

4. "The application did not respond"

You did not acknowledge the interaction within 3 seconds. Typical causes:

  • A slow API or database call before reply(). Call deferReply() first, then editReply().
  • The handler threw before replying. Your logs (step 0) will show it.
  • The event listener is not registered, for example a interactionCreate listener inside a file you never import.

If you try to answer too late you also get 10062 Unknown interaction. If you reply twice you get 40060 Interaction has already been acknowledged: use followUp() or editReply() for the second message.

5. Permission errors in specific channels

Code Meaning Usual fix
50001 Missing Access The bot cannot see the channel (View Channel denied by an overwrite) or is not in that server.
50013 Missing Permissions It can see the channel but lacks Send Messages, Embed Links, Attach Files, Send Messages in Threads or a role hierarchy requirement.

Channel and category permission overwrites beat server-wide role permissions, which is why a bot works in one channel and not another. For moderation actions, the bot's highest role must also be above the target member's highest role.

6. It works locally but not on the host

  • A missing environment variable (the token, a database URL). Validate with the .env validator.
  • A different Node.js or Python version. Pin it (engines in package.json, python:3.12-slim in Docker).
  • The host only runs web processes and stops your worker for not binding a port. Use a worker/background service type, or a host meant for always-on processes: Discord bot hosting 24/7.

7. Rate limits

A bot that sends many messages can be throttled. HTTP 429 responses include a retry_after value; libraries like discord.js and discord.py queue and wait automatically, so the symptom is delay rather than an error. If you see long pauses, look for loops that edit or send messages too often. See rate limits explained.

Frequently asked questions

Do I need to verify my bot for intents?

Below 100 servers you can enable privileged intents yourself in the portal. Verified bots (required at 100 servers) must apply for each privileged intent they use.

My bot replies in DMs but not in servers. Why?

DMs include message content without the privileged intent, and DMs have no permission overwrites. In servers, check the Message Content intent and the channel permissions.

The bot worked yesterday and stopped today. What changed?

Check whether the token was reset (a leak scan can trigger that), whether a deploy started a second instance, and whether someone changed channel permissions.

Sources