Why does on_message stop commands from working?

From the documentation:

Overriding the default provided on_message forbids any extra commands from running. To fix this, add a bot.process_commands(message) line at the end of your on_message. For example:

@bot.event
async def on_message(message):
    # do some extra stuff here

    await bot.process_commands(message)

The default on_message contains a call to this coroutine, but when you override it with your own on_message, you need to call it yourself.

Leave a Comment