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
14
use crate::Client;
use crate::errors::Result;
use crate::raw::functions;
use crate::types::StickerSet;
use crate::utils::input_sticker_set;

impl Client {
    /// Renames a sticker set, found by its `name`, and returns the updated set.
    pub async fn set_sticker_set_title(&self, name: &str, title: impl Into<String>) -> Result<StickerSet> {
        let (stickerset, title) = (input_sticker_set(name), title.into());
        let request = functions::stickers::RenameStickerSet { stickerset, title };
        StickerSet::parse(self.invoke(&request).await?)
    }
}