Answers for "discord.py optional argument"

1

optional arg discord py

async def command (ctx, amount: typing.Optional[int] = 0)
Posted by: Guest on June-11-2021
1

discord.py optional argument

@client.command()
async def hellothere(ctx, *, msg):
    await ctx.send("General Kenobi")
#to add an optional Argument simply add an =None (anything else alowed to) after msg
#the * means that it gives you everthing after the command
async def hellothere(ctx, *, msg=''):
Posted by: Guest on December-11-2020

Code answers related to "discord.py optional argument"

Python Answers by Framework

Browse Popular Code Answers by Language