“help”命令不存在 pycord

问题描述 投票:0回答:1

当我输入 /help 时,出现此错误:

 "discord.ext.commands.errors.CommandNotFound: Command "help" is not found"
@bot.slash_command(name="help", description="Get help via a helpful video!")
async def help_command(ctx: discord.ApplicationContext):
    user_mention = ctx.author.mention
    help_embed = discord.Embed(title="Help Video",
                               description=f"{user_mention}, here is the help video you requested:",
                               color=discord.Color.blue())
    help_embed.add_field(
        name="Watch Video",
        value="[Click here to watch](https://cdn.discordapp.com/attachments/993834541103976449/1193685361369563176/SPOILER_JOSH-1.mp4)",
        inline=False
    )
    await ctx.respond(embed=help_embed)

当我执行 /help 命令时,它应该提及用户并发送视频。

python pycord
1个回答
0
投票

在论坛上提问之前,您应该先用 Google 搜索一下,并稍微阅读一下 PyCord 的文档:

https://guide.pycord.dev/extensions/commands/help-command

无论如何,如果你真的想要像另一个一样的斜杠命令,你可以这样做:

bot = commands.Bot(any_parameter_here, help_command=None)

然后根据需要定义命令。

© www.soinside.com 2019 - 2024. All rights reserved.