Skip to content

Document embed::ImageSource::attachment usage #2133

@laralove143

Description

@laralove143

To add a file image to an embed, you need to add an attachment to the message and call ImageSource::attachment with the same filename. The documentation could give information on this.

The example at EmbedBuilder::image also only shows how to use it with URLs, which is simpler to do. There could be an example for files as well.

Although you could make assumptions or check the Discord docs for this, I think these additions fit nice in Twilight documentation itself. I'm willing to PR this if the changes are approved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c-httpAffects the http cratec-utilAffects the util cratet-docsA change to the documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions