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
15
16
use crate::Client;
use crate::errors::Result;
use crate::raw::functions;
use crate::types::LangPackDifference;

impl Client {
    /// Returns every string of a language pack in `lang_code`, with the pack's version.
    pub async fn get_lang_pack(
        &self,
        lang_pack: impl Into<String>,
        lang_code: impl Into<String>,
    ) -> Result<LangPackDifference> {
        let request = functions::langpack::GetLangPack { lang_pack: lang_pack.into(), lang_code: lang_code.into() };
        Ok(LangPackDifference::parse(self.invoke(&request).await?))
    }
}