1
0
mirror of https://github.com/Rapptz/discord.py.git synced 2025-05-12 16:59:50 +00:00

Add bot.listen() suggestion to on_message faq

This commit is contained in:
PikalaxALT 2020-09-20 00:15:10 -04:00 committed by GitHub
parent 6ae615baae
commit e7b4bbe2f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -344,6 +344,15 @@ Overriding the default provided ``on_message`` forbids any extra commands from r
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):
# do stuff here
# do not process commands here
Why do my arguments require quotes?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~