到目前为止,我尝试用discord.py重写创建自定义帮助命令
@bot.command(pass_contex = true)
async def help(ctx):
author = ctx.message.author
embed.set_author(name="Help")
embed.add_field(name="!Commands" , value= "Type '!' + a name starting with a capital" , inline=False)
await bot.send_message(author, embed=embed)
但这会给出关于机器人不打算发送消息的错误
答案 0 :(得分:0)
您遇到拼写错误的问题
@bot.command(pass_contex = true)
应该是
@bot.command(pass_context = True)
您从未真正嵌入过
author = ctx.message.author
embed = discord.Embed()
embed.set_author(name="Help")
embed.add_field(name="!Commands" , value= "Type '!' + a name starting with a capital" , inline=False)
await ctx.send(author, embed=embed)