check if user has manage messages discord.py
@client.event
async def on_message(message):
message.author.guild_permissions.manage_messages # returns bool
check if user has manage messages discord.py
@client.event
async def on_message(message):
message.author.guild_permissions.manage_messages # returns bool
discord py check if user has permission return message if not
@bot.command()
@has_permissions(kick_members=True)
async def kick(self, ctx, Member: discord.Member):
await bot.kick(Member)
@kick.error
async def kick_error(error, ctx):
if isinstance(error, MissingPermissions):
await ctx.send("You don't have permission to do that!")
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us