diff options
| author | Austin Hellyer <[email protected]> | 2016-11-07 08:47:12 -0800 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2016-11-07 08:47:12 -0800 |
| commit | 4db16290ba02aad362f16b0b41d46abab39c737c (patch) | |
| tree | a86d8b79fff5c294d16ffb25a435e32bec3d9658 /src/ext/framework/command.rs | |
| parent | Remove Context::get_application{s,_info} (diff) | |
| download | serenity-4db16290ba02aad362f16b0b41d46abab39c737c.tar.xz serenity-4db16290ba02aad362f16b0b41d46abab39c737c.zip | |
Add Attachment::download{,to_directory}
Adds two methods to the Attachment model:
- download: uses Hyper to download the attachment and return it as a vec
of bytes;
- download_to_directory: equivilant to `download`, except it will also
save the bytes to a file named equivilant to the filename in a given
directory.
Check the documentation for Attachment for more information and
examples:
<https://docs.austinhellyer.me/serenity.rs/latest/serenity/model/struct.Attachment.html>
Diffstat (limited to 'src/ext/framework/command.rs')
0 files changed, 0 insertions, 0 deletions