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)
Alternatively, you can place your on_message logic into a listener. In this setup, you should not manually call bot.process_commands(). This also allows you to do multiple things asynchronously in response to a message. Example:
@bot.listen("on_message")
async def whatever_you_want_to_call_it(message):
await do_stuff_here()
# Do not process commands here
Last updated