#Send image
1 messages · Page 1 of 1 (latest)
Hey! Once your issue is solved, press the button below to close this thread!
It is possible
How
I can't find anything on docs
Ever wanted to set an image into an Embed but discovered you need an URL? This will help you out:
file = interactions.File("image.png")
embed = interactions.Embed(...)
embed.set_image(url="attachment://image.png")
await channel.send(embeds=embed, files=file)
you need to create a File object out of your image, then send it
that's it
you can ignore the part of the embed if your image is not needed in the embed
Sorry, I phrased it badly. What I was trying to do is to make a command that receives a PNG/JPG/JPEG file as a parameter and then send the file to a different channel
oh then you need to define an option that is of type Attachment