📜  discord.py 可选参数 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:56.803000             🧑  作者: Mango

代码示例2
@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=''):