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;
use crate::types::PeerRef;

impl Client {
    /// Replaces the description of a group or channel.
    pub async fn set_chat_description(
        &self,
        chat_id: impl Into<PeerRef>,
        description: impl Into<String>,
    ) -> Result<()> {
        let peer = self.resolve_peer(chat_id).await?;
        self.invoke(&functions::messages::EditChatAbout { peer, about: description.into() }).await?;
        Ok(())
    }
}