【发布时间】:2022-01-07 12:51:26
【问题描述】:
基本上我想调用一个子命令。如果我在这里有这段代码,有趣的是子命令:
@client.group()
async def help(ctx):
if ctx.invoked_subcommand is None:
await ctx.send("Hello")
@help.command()
async def fun(ctx):
if ctx.invoked_subcommand is None:
await ctx.send("Fun")
我想要另一个命令,例如:
async def invoke_fun(ctx),它调用子命令 fun,但不调用 help 命令。
提前感谢您的帮助。
【问题讨论】:
标签: python discord discord.py