#I'm trying to set embed.set_image() from ctx.author.avatar_url but it says it has 2 arguments

1 messages · Page 1 of 1 (latest)

quick talon
ancient forge
#

send the code please

quick talon
#

this is the whole code to send the embed

#
#Funcion para mandar el embed
async def embed(ctx, des, color, name):
    embed = discord.Embed(description= des,
    timestamp=datetime.datetime.now(tz=madrid),
    color= color)
    embed.set_footer(text="Solicitado por: {}".format(ctx.author.name), icon_url=ctx.author.avatar_url)
    embed.set_author(name= name)
    embed.set_image(ctx.author.avatar_url)
    await ctx.send(embed=embed)```
#

i want to set the image that has the red square

#

he sets an url but i want to take that url from the user who sends the command

ancient forge
#

change avatar_url to avatar.url

quick talon
#

okay i'll try it

#

File "path\bot\main.py", line 19, in embed
embed.set_footer(text="Solicitado por: {}".format(ctx.author.name), icon_url=ctx.author.avatar.url)
AttributeError: 'str' object has no attribute 'url'

#

i get this error

quick talon
#

any thoughts?

quartz girder
#

embed.set_thumbnail(url=url)

quick talon
#

i'll try it

quartz girder
#

It is the red boxed image right

quick talon
#

yep

#

i was wondering if it was thumbnail or image

#

so i wanted to try it

#

but get that error

quartz girder
quick talon
#

no it's fixed now

#

i think it was to set url=url

#

bcs last time i was just placing the embed.set_image(ctx.author.avatar_url)

quartz girder
#

Yep

quick talon
#

yeah it works now

#

btw

quartz girder
#

hm?

quick talon
#

is it normal to have this high ping?

quartz girder
#

¯_(ツ)_/¯

quick talon
#

and it takes a few seconds to start the bot too

#

and i have a less than 100 lines of code xD

quartz girder
#

Bad host maybe?

quick talon
#

i'm hosting it myself xD

quartz girder
#

Oh

quick talon
#

starting it from vs code

quartz girder
#

No idea then sorry

quick talon
#

no worries