discord.py重写帮助命令

discord.py重写帮助命令,discord,discord.py,discord.py-rewrite,Discord,Discord.py,Discord.py Rewrite,是否有人有任何想法/来源,我可以在其中找到获得帮助命令的方法,例如: 我添加了一个名为command1的命令,然后一旦我重新启动bot,它会将其添加到help命令中,但是如果我将其设置为hidden,它不会显示您好,我以前遇到过这个问题,而且所有discord bot都内置了一个help命令。您需要使用这行代码bot.remove\u命令删除预构建的命令(“帮助”)然后使您拥有自己的帮助命令: @bot.command() async def help(ctx): await ctx.s

是否有人有任何想法/来源,我可以在其中找到获得帮助命令的方法,例如:
我添加了一个名为command1的命令,然后一旦我重新启动bot,它会将其添加到help命令中,但是如果我将其设置为hidden,它不会显示您好,我以前遇到过这个问题,而且所有discord bot都内置了一个help命令。您需要使用这行代码
bot.remove\u命令删除预构建的命令(“帮助”)
然后使您拥有自己的帮助命令:

@bot.command()
async def help(ctx):
    await ctx.send("Here are all my commands\nhelp - shows this")
    # or make an embed (https://codepen.io/orels/full/egZyxq) auto embed maker
把所有东西放在一起:

import discord
from discord.ext import commands

client = commands.Bot(command_prefix=".")
bot.remove_command("help")

@bot.command()
async def help(ctx):
    await ctx.send("Here are all my commands\nhelp - shows this")
    # or make an embed (https://codepen.io/orels/full/egZyxq) auto embed 

client.run("TOKEN GOS HERE!")
您需要添加以下内容:

bot.remove_command('help')
这是必需的,因为机器人程序具有内置的帮助命令。

如果您使用的是“客户端”

client.remove_命令(“帮助”)
异步def帮助(ctx):
等待ctx.send(“在此处键入文本”)
如果您使用的是“机器人”

bot.remove_命令(“帮助”)
异步def帮助(ctx):
等待ctx.send(“在此处键入文本”)

默认情况下,bot将有一个
帮助
命令。要创建自己的帮助命令,您可以查看文档的这一部分: