I have an on_message event to prevent users with "Muted" role from sending messages:
@client.event async def on_message(ctx): muted=ctx.author.g