Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to limit a command to a permission in discord.py

# Make sure you don't have a command called "commands"
@client.command() # As usual
@commands.has_permissions(administrator=True) # Making sure the person executing the command has the permissions
async def foo(ctx):
	await ctx.send("Hello")
    #ect
 
PREVIOUS NEXT
Tagged: #limit #command #permission
ADD COMMENT
Topic
Name
5+8 =