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
13
14
15
16
17
use crate::Client;
use crate::errors::Result;
use crate::raw::functions;

impl Client {
    /// Sets the username of the business account behind a connection.
    pub async fn set_business_account_username(
        &self,
        business_connection_id: impl Into<String>,
        username: &str,
    ) -> Result<()> {
        let business_connection_id: String = business_connection_id.into();
        let request = functions::account::UpdateUsername { username: username.into() };
        self.invoke_business(Some(&business_connection_id), request).await?;
        Ok(())
    }
}