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
use super::get_similar_channels::parse_channels;
use crate::Client;
use crate::errors::Result;
use crate::raw::functions;
use crate::types::Chat;

impl Client {
    /// Returns the groups you can link to a channel as its discussion group.
    pub async fn get_suitable_discussion_chats(&self) -> Result<Vec<Chat>> {
        let found = self.invoke(&functions::channels::GetGroupsForDiscussion {}).await?;
        Ok(parse_channels(self, found))
    }
}