【发布时间】:2021-08-03 07:07:40
【问题描述】:
所以我制作了这个帮助命令部分,如果用户键入 %help moderation,它会列出审核命令。但我想要别名或禁用区分大小写。
@client.event
async def on_message(message):
if message.content.startswith('%help moderation'):
await message.channel.send("%ban, %kick, %purge <limit>, %warn, %membercount, %botcount")
然后,这是我实际嵌入的帮助命令:
@client.command()
async def help(ctx):
embed=discord.Embed(title="Commands",
description="Here are all the commands to use:", color=0x0618C1)
embed.add_field(name="Moderation", value="Moderation Commands", inline=False)
embed.add_field(name="Fun", value="General Fun Commands", inline=True)
embed.add_field(name="Random", value="Commands that do random things", inline=True)
await ctx.send(embed=embed)
【问题讨论】:
-
您是否正在寻找向帮助命令添加额外选项(参数)/使其不区分大小写的方法?
-
首先,我收到一个错误,提示 embed 未分类,是的,我正在寻找一种添加参数的方法。
标签: python command discord.py