0

I'm using

@client.event
async def on_message(message):

to check for messages sent by users. I'm also using

@client.command(aliases=['a'])
async def a(ctx):

to check if a command is being run. when i leave the on message in, the command part won't run. what do i do.

John Henry 5
  • 169
  • 9
  • Does this answer your question? [Why does on\_message stop commands from working?](https://stackoverflow.com/questions/49331096/why-does-on-message-stop-commands-from-working) – Benjin Nov 06 '20 at 09:40

1 Answers1

1

If you're using on_message event, it blocks your commands. In order to prevent this, you can use await client.process_commands(message). You just have to add this line of code in the last line of your on_message event.

Nurqm
  • 4,715
  • 2
  • 11
  • 35