Discord.py重写<discord.embeds.Embed对象位于0x108778288>

时间:2019-07-07 22:47:22

标签: python discord discord.py-rewrite

一年后,我正在访问discord.py,发现显然没有异步可用,所以现在很明显,现在我正在使用重写,不知道我在做什么。我正在尝试发送一个简单的嵌入内容,但该机器人却这样说:

'<discord.embeds.Embed object at 0x108778288>'

这是我的代码:

@bot.command(pass_context=True)
async def help(ctx):
    aiuto = discord.Embed(title="Help", description="being helpful")
    await ctx.send(aiuto)

2 个答案:

答案 0 :(得分:0)

答案吧: 等待ctx.send(embed = aiuto)

答案 1 :(得分:0)

您现在可以将embed kwarg传递给邮件,

await ctx.send(embed = aiuto)

此外,在discord.py重写中,您无需将pass_context传递给bot.command@bot.command 也可以