vaegram 0.2.0

Telegram MTProto client library for users and bots
Documentation
use crate::Client;
use crate::errors::Result;
use crate::methods::accepted;
use crate::raw::functions;
use crate::types::PeerRef;

impl Client {
    /// Deletes an ephemeral message that `receiver_user_id` sees in the chat.
    pub async fn delete_ephemeral_message(
        &self,
        chat_id: impl Into<PeerRef>,
        receiver_user_id: impl Into<PeerRef>,
        ephemeral_message_id: i32,
    ) -> Result<()> {
        let request = functions::ephemeral::DeleteMessage {
            peer: Some(self.resolve(&chat_id.into()).await?.1),
            receiver_id: self.resolve_user(&receiver_user_id.into()).await?,
            id: ephemeral_message_id,
        };
        accepted(self.invoke(&request).await?)
    }
}