“Discord.py Необязательный аргумент” Ответ

Необязательный Arg Discord py

async def command (ctx, amount: typing.Optional[int] = 0)
CowCode

Discord.py Необязательный аргумент

@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=''):
Eager Elephant

Ответы похожие на “Discord.py Необязательный аргумент”

Вопросы похожие на “Discord.py Необязательный аргумент”

Больше похожих ответов на “Discord.py Необязательный аргумент” по Python

Смотреть популярные ответы по языку

Смотреть другие языки программирования