这是我的代码示例。
@client.command()
async def test(ctx):
test = discord.Embed(
title=f"{ctx.author.avatar_url}",
#skip
)
await ctx.send(embed=test)
答案 0 :(得分:0)
使用 author
方法代替 title
属性设置 set_author()
属性。像这样:
@client.command()
async def test(ctx):
test = discord.Embed()
test.set_author(name="title", icon_url=ctx.author.avatar_url)
await ctx.send(embed=test)
答案 1 :(得分:0)
在这种情况下,图片在embed.thumbnail
和embed.author.image
中,所以你必须设置这两个:
@client.command()
async def test(ctx):
test = discord.Embed(title=f"Your embed title in the picture you attached it's Eggspert Player but doesn't have to be")
test.set_author(name=ctx.author.name, icon_url=ctx.author.avatar_url)
test.set_thumbnail(url=ctx.author.avatar_url)
await ctx.send(embed=test)
参考资料: