Open UCYT5040 opened 2 years ago
@bot.slash() async def ping(ctx): #or whatever you need for a slash command# """"description"""" ctx.send("Pong!")
what you can add for slash commands (+ examples) after defining the function:
Choice=["foo", "bar"]
Int=""
Float=""
Bool=[]
Str=""
Rqd=Bool
example
@bot.slash() async def echo(ctx): Str="", Rqd=True ctx.send(Str) (written by @Kerkpower)
options will have to be placed in the @bot.slash decorator, like @bot.slash(options=[OptionTypes.String(name="foo", description="bar")])
@bot.slash(options=[OptionTypes.String(name="foo", description="bar")])
@bot.slash() async def ping(ctx): #or whatever you need for a slash command# """"description"""" ctx.send("Pong!")
what you can add for slash commands (+ examples) after defining the function:
choices, makes a choice
Choice=["foo", "bar"]
integer, makes sure inputted text is an integer
Int=""
float, makes sure inputted text is a float
Float=""
boolean, like a choice command, but it can only be True or False
Bool=[]
string, allows the user to type smt
Str=""
and the required, which is added after one of the above optionally
Rqd=Bool
example
@bot.slash() async def echo(ctx): Str="", Rqd=True ctx.send(Str) (written by @Kerkpower)