So I've been trying to make a discord.py command that sends the mentioned users avatar in a embed.
this is what i have so far
@client.command()
async def v1_3(ctx, user: discord.User):
avurl = user.avatar_url
embed=discord.Embed(title=f"{user.name}", description=f"{avurl}", color=0xf20202)
await ctx.send(embed=embed)
CodePudding user response:
so what your doing is putting the url in the description field, what you wanna do is:
@client.command()
async def v1_3(ctx, user: discord.User):
embed = discord.Embed(title=f'{user.name}' , color = 0xf20202)
avurl = user.avatar_url
e.set_image(url=f'{avurl}')
await ctx.send(embed=embed)
this will send the embed with the users avatar