Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document embed::ImageSource::attachment usage #2133

Open
laralove143 opened this issue Feb 10, 2023 · 0 comments
Open

Document embed::ImageSource::attachment usage #2133

laralove143 opened this issue Feb 10, 2023 · 0 comments
Labels
c-http Affects the http crate c-util Affects the util crate t-docs A change to the documentation

Comments

@laralove143
Copy link
Member

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.

@zeylahellyer zeylahellyer added t-docs A change to the documentation c-http Affects the http crate c-util Affects the util crate labels Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-http Affects the http crate c-util Affects the util crate t-docs A change to the documentation
Projects
None yet
Development

No branches or pull requests

2 participants