I am in the process of making a discord bot using discord.py and asyncio. The bot has commands like kick and ban which obviously should not be avai
You could also use decorators.
@bot.command(name = "Kick")
@bot.has_permissions(kick_user = True)
@bot.bot_has_permissions(kick_user = True)
async def _kick(ctx, member: Member):
#Do stuff...
The advantage of checking user and bot permissions means it is easier to handle errors from either providing useful "Insufficient Permission" error messages.