Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

discord.py make command admin only

# 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
Comment

how to let only admins do a command in discord.py

@commands.has_permissions(administrator=True)
@client.command() 
async def admins_only_command(ctx, *, args):
    # ur code
Comment

PREVIOUS NEXT
Code Example
Python :: convert a text file data to dataframe in python without pandas 
Python :: pandas do not display index 
Python :: plot cumulative distribution function (cdf) in seaborn 
Python :: python pandas how to get all of the columns names 
Python :: how to check encoding of csv 
Python :: precision and recall from confusion matrix python 
Python :: streamlit headings;streamlit text 
Python :: turtle with python 
Python :: days to int 
Python :: numpy linspace of dates 
Python :: python leetcode 
Python :: not equal python 
Python :: how to replace an element of a list using list comprehension 
Python :: format column from string to numeric in python 
Python :: numpy sqrt 
Python :: decode vnc hash 
Python :: tkinter background image python 3 
Python :: random.randint 
Python :: python print emoji 
Python :: python csv reader cast to float 
Python :: what is tensor in deep learning 
Python :: pandas read_excel 
Python :: python *x 
Python :: lambda en python 
Python :: python constant 
Python :: dynamic plot jupyter notebook 
Python :: numpy one hot 
Python :: how to get all index of a char of a string in python 
Python :: how to filter a series in pandas 
Python :: get binary string python 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =