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

impl Client {
    /// Hides a received gift from the profile.
    ///
    /// `owned_gift_id` is the `owned_gift_id` of an owned gift, or a unique gift's slug.
    /// [`Client::show_gift`] undoes it.
    pub async fn hide_gift(&self, owned_gift_id: impl Into<String>) -> Result<()> {
        let stargift = self.input_saved_gift(&owned_gift_id.into()).await?;
        self.invoke(&functions::payments::SaveStarGift { unsave: true, stargift }).await?;
        Ok(())
    }
}