📜  discord.py commands.group - Python 代码示例

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

代码示例1
@bot.group()
async def git(ctx):
    if ctx.invoked_subcommand is None:
        await ctx.send('Invalid git command passed...')

@git.command()
async def push(ctx, remote: str, branch: str):
    await ctx.send('Pushing to {} {}'.format(remote, branch))