首页 > 解决方案 > A client event prevents my commands from working

问题描述

So I tried making a on_message event which detects a keyword and responds to it, but the problem is that now it doesn't let the other commands work?

async def on_message(message):
    if 'gay' in message.content:
        await message.channel.send('no u')

标签: discord.py

解决方案


您需要await client.process_commands(message)在活动结束时添加on_message


推荐阅读