#Can't send local image into embed's author

1 messages · Page 1 of 1 (latest)

fleet mist
#

Hello i'm trying to send an image into author field of my embed but it requires only HTTP or HTTPS. How can i do please ?
Code:

season_image_path: str = functions.getSeasonImage(saison)
embed.set_author(name=functions.getLocalization(self.bot, "STATS_EMBED_SEASON", inter.locale, season=saison), url="https://www.eva.gg/profile/season/", icon_url=season_image_path)

Output:

In embeds.0.author.icon_url: Scheme "assets/images/season_2.png" is not supported. Scheme must be one of ('http', 'https').
oblique bobcat
#

because

#

it has to be a url

#

can't do local

fleet mist
#

Sure. How can i send it as link so ?

summer jungleBOT
#

set_author(*, name, url=None, icon_url=None)```
Sets the author for the embed content.

This function returns the class instance to allow for fluent-style chaining.
oblique bobcat
#

upload the img somewhere lol

fleet mist
#

really ? it's annoying

oblique bobcat
#

it says right there url

fleet mist
#

why can't we just send image in author like set_thumbnail or set_image

oblique bobcat
#

ask discord

fleet mist
#

if i upload the image in discord like a file, then can i use it's url ?

turbid schooner
vagrant zephyr
#

Have you tried attachment://?

fleet mist
#

nop i'll try it rn

vagrant zephyr
#

That works for set_image() but I'm just curious it would be able to work with that as well

oblique bobcat
#

i forgot that existed

#

it should work
(only supports http(s) and attachments)

vagrant zephyr
#

If you pass a file to set_image() that's what happens in the background

fleet mist
#

Hum i didn't get any error but didn't get any author's image too 😅

#

I tried with this:

season_image_path = 'assets/images/season_2.png'
icon_url="attachment://" + season_image_path
vagrant zephyr
#

Unfortunately my idea failed. Looks like it absolutely must come from a hosted source via url

fleet mist
#

Damn, but ty for the efforts

#

i should work with imgur api now 🫠

vagrant zephyr
#

Could just cheat 😄