如何发送自定义帮助 PM
How to send a custom help PM
尝试使用 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)
但这给出了关于机器人不打算发送消息的错误
您有一些拼写错误
@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)
尝试使用 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)
但这给出了关于机器人不打算发送消息的错误
您有一些拼写错误
@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)