vaegram 0.3.0

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

impl Client {
    /// Returns the stickers of the given custom emoji ids.
    pub async fn get_custom_emoji_stickers(&self, custom_emoji_ids: &[i64]) -> Result<Vec<Sticker>> {
        let request = functions::messages::GetCustomEmojiDocuments { document_id: custom_emoji_ids.to_vec() };
        Ok(self.invoke(&request).await?.iter().filter_map(Sticker::parse).collect())
    }
}