【发布时间】:2021-12-10 07:17:48
【问题描述】:
如何为 discord.py 中的命令分配子帮助?
class xkcd(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command()
async def hi(self, ctx):
await ctx.send('hey')
当我键入 时,它应该会显示有关该命令的更多信息。 我该怎么做?
【问题讨论】:
-
检查this。答案中有一条评论应该可以帮助您。
-
我无法理解您所说的“子帮助”是什么意思。您的意思是要使用默认的 discord.py
help命令实现为hi命令添加帮助消息? -
@Taku by sub-help,我的意思是如果你在 help
前加上前缀,它应该会显示有关该命令的更多信息。
标签: python discord discord.py bots