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

impl Client {
    /// Returns channels Telegram recommends to you.
    pub async fn get_recommended_channels(&self) -> Result<Vec<Chat>> {
        let found = self.invoke(&functions::channels::GetChannelRecommendations { channel: None }).await?;
        Ok(parse_channels(self, found))
    }
}