Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

discord.py say something

#Discord.py rewrite
#python 3+
@bot.command(name='say_hi', help='Run this command when your lonely!')
async def sayhi(ctx):
	#This code will say "Hi, @username!"
	#this uses an 'f' befoe a string so I can input the username
	#ctx has many propertys, including .send .author and .content (there are more)
    await ctx.send(f"Hi, {ctx.author.mention}!")
Comment

PREVIOUS NEXT
Code Example
Python :: handle errors in flask 
Python :: delete all elements in list python 
Python :: multiprocessing a for loop python 
Python :: csv writer python 
Python :: basic pygame window 
Python :: press key on python 
Python :: how to url encode using python django 
Python :: get range of items of python list 
Python :: remove all odd row pandas 
Python :: fill zero behind number python 
Python :: ion flux relabeling 
Python :: iterate through characters in a string python 
Python :: plt.savefig specify dpi 
Python :: indentation levels in programming 
Python :: numpy combinations of 5 bits 
Python :: sympy function definition 
Python :: how to delete a variable python 
Python :: python iterate set 
Python :: how to move tkinter images 
Python :: python lock using a file 
Python :: python return min length of list 
Python :: remove first character of string python 
Python :: xgboosat save_model 
Python :: networkx max degree node 
Python :: remove nans and infs python 
Python :: replace values in a column by condition python 
Python :: instance variable in python 
Python :: concatenate int to string python 
Python :: flask python use specified port 
Python :: request headers in django 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =