“discord.py argumento opcional” Respostas de código

Arg opcional discord py

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

discord.py argumento opcional

@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

Respostas semelhantes a “discord.py argumento opcional”

Perguntas semelhantes a “discord.py argumento opcional”

Mais respostas relacionadas para “discord.py argumento opcional” em Python

Procure respostas de código populares por idioma

Procurar outros idiomas de código