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
use crate::Client;
use crate::errors::Result;
use crate::raw::functions;
use crate::types::Photo;
use crate::types::messages_and_media::input_photo;

impl Client {
    /// Deletes the given photos from your profile.
    pub async fn delete_profile_photos(&self, photos: &[Photo]) -> Result<()> {
        let id = photos.iter().map(|photo| input_photo(&photo.location)).collect();
        self.invoke(&functions::photos::DeletePhotos { id }).await?;
        Ok(())
    }
}