check if user has manage messages

async def on_message(message): # returns bool

Here is what the above code is Doing:
1. It’s checking if the message author has the manage_messages permission.
2. If they do, it returns True.
3. If they don’t, it returns False.

Now, let’s use this in our code: