@bot.command() @commands.has_permissions(manage_messages=True) async def test(ctx): await ctx.send('You can manage messages.') # https://discordpy.readthedocs.io/en/stable/api.html#discord.Permissions