如何获取发消息人的头像url?

How to get avatar url of the person who sent the message?

如何从上下文中获取发送命令的人的头像url?

@client.command()
async def test(ctx):
    print("Username is = " + ctx.message.author)
    print(ctx.message.author + "'s avatar url is = " )

如你所见,我可以很容易地从上下文中获取作者,但是我如何获取他们的头像?

我已经看到了解决方案,但它不是来自上下文

获取作者头像url只需使用ctx.message.author.avatar_url

@client.command()
async def test(ctx):
    print("Username is = " + ctx.message.author)
    print(ctx.message.author + "'s avatar url is = " + ctx.message.author.avatar_url)