NewSchokr 13 is here. A whole new UI, seven locations, snapshots and more. Read more →

Discord bot is online but not responding to commands

Your bot shows online but ignores messages or slash commands. Check intents, message content, permissions, registration and duplicate instances.

Updated · 2 min read

If your bot shows as online but doesn't respond, it's connected to Discord but either isn't receiving the events it needs or is failing silently while handling them. Work through these checks in order; the first two cause most cases.

1. Message Content intent is missing (prefix commands)

If !commands stopped working or never worked, your bot probably can't read message text. Without the Message Content intent, message.content is an empty string in server channels.

  • discord.js: include GatewayIntentBits.GuildMessages and GatewayIntentBits.MessageContent in the client's intents.
  • discord.py: set intents.message_content = True.
  • In both cases, also enable Message Content Intent on the Bot page of the Developer Portal.

See privileged intents for details. Or move to slash commands, which don't need it.

2. discord.py: on_message is swallowing commands

If you define on_message with @bot.event, prefix commands stop working unless you pass the message on:

@bot.event
async def on_message(message):
    if message.author.bot:
        return
    # your logic here
    await bot.process_commands(message)

Or use @bot.listen("on_message"), which doesn't replace the command handler.

3. Slash commands aren't registered or handled

  • The command must be registered (synced). Look for your "registered/synced N commands" log line.
  • The bot must have been invited with the applications.commands scope.
  • In discord.js, check you're comparing the right name in interactionCreate and that you're not returning early for the wrong interaction type.

See discord.js slash commands or discord.py slash commands. If Discord shows "The application did not respond", see fixing "This interaction failed".

4. Errors are being thrown

An exception inside a handler stops that response but often leaves the bot online. Open the console on Schokr and trigger the command again while watching for a stack trace. See reading bot logs.

Common ones:

  • Missing Permissions (code 50013): the bot's role can't do what you asked.
  • Missing Access (code 50001): the bot can't see that channel.
  • TypeError or AttributeError: a bug in your handler.

5. Channel permissions

The bot needs View Channel, Send Messages and, for embeds, Embed Links in that specific channel. Channel overrides can deny these even when the bot's role allows them. Test in a channel where the bot clearly has access.

6. Two copies of the bot are running

If your bot is also running on your own computer, both copies receive events. One may be old code, or both reply. Stop the local copy whenever the Schokr server is running. A common sign is commands that work only sometimes, or double replies.

7. Wrong prefix or the bot ignores itself and others

  • Check the prefix in code matches what you type.
  • Most bots ignore other bots with a message.author.bot check. If you're testing with another bot, that's why.

8. Ready but no Guilds intent (discord.js)

Without GatewayIntentBits.Guilds, the bot's cache of servers and channels stays empty and lots of things quietly break. Always include it.

Still stuck?

Add a log line at the very top of your message or interaction handler. If it never prints, the event isn't arriving (intents, registration or a second instance). If it prints, the problem is in your handler. Share the result in the Schokr Discord.