vaegram 0.2.0

Telegram MTProto client library for users and bots
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::Client;
use crate::errors::Result;
use crate::raw::functions;
use crate::types::Animation;
use crate::types::messages_and_media::input_document;

impl Client {
    /// Saves `gif` to the account's saved GIFs.
    pub async fn add_to_gifs(&self, gif: &Animation) -> Result<()> {
        self.invoke(&functions::messages::SaveGif { id: input_document(&gif.location), unsave: false }).await?;
        Ok(())
    }
}