#Send image

1 messages · Page 1 of 1 (latest)

left axle
#

Is it possible to send an image to the Bot so that the Bot can send it to a specific channel?

vocal spadeBOT
#

Hey! Once your issue is solved, press the button below to close this thread!

river bramble
#

It is possible

left axle
#

How

left axle
#

I can't find anything on docs

vocal spadeBOT
#

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)
next canyon
#

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

left axle
#

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

next canyon
#

oh then you need to define an option that is of type Attachment