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::methods::accepted;
use crate::raw::{base, functions, types};

impl Client {
    /// Sets the intro shown in an empty chat with the business account, without a sticker.
    pub async fn set_business_intro(&self, title: impl Into<String>, message: impl Into<String>) -> Result<()> {
        let intro = types::InputBusinessIntro { title: title.into(), description: message.into(), sticker: None };
        let intro = Some(base::InputBusinessIntro::InputBusinessIntro(Box::new(intro)));
        accepted(self.invoke(&functions::account::UpdateBusinessIntro { intro }).await?)
    }
}