Skip to content

Add "Local File to Embed" tag #131

@ChiliMX

Description

@ChiliMX

Create a .md file in /tags with the following content inside:

f = discord.File("some_file_path", filename="image.png")
e = discord.Embed()
e.set_image(url="attachment://image.png")
await messagable.send(file=f, embed=e)

# Note that the filename in the File constructor and the filename in the URL must match.

Docs: https://discordpy.readthedocs.io/en/latest/faq.html#how-do-i-use-a-local-image-file-for-an-embed-image


This question is frequently asked in the discord.py channel, so having a tag would make a lot of sense, and save a lot of time.

Metadata

Metadata

Assignees

Labels

area: tagsRelated to the @Python bot's tags

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions