vaegram 0.2.0

Telegram MTProto client library for users and bots
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::Client;
use crate::errors::Result;

impl Client {
    /// Returns how many contacts you have.
    ///
    /// Fetches the whole contact list through [`Client::get_contacts`] and counts it.
    pub async fn get_contacts_count(&self) -> Result<i32> {
        Ok(self.get_contacts().await?.len() as i32)
    }
}