Skip to content
Discussion options

You must be logged in to vote

comands.has_permissions is used as a decorator to check if the user who ran the command has the permissions to run the command
example:

@commands.command(description="kick someone")
@commands.guild_only()
@commands.has_permissions(kick_members=True)
async def kick(self, ctx, member : discord.Member,*,reason=None):
    await member.kick(reason=reason)

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by prsh11
Comment options

You must be logged in to vote
2 replies
@prsh11
Comment options

@wasi-master
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants