vaegram 0.2.0

Telegram MTProto client library for users and bots
Documentation
use crate::Client;
use crate::methods::EditEphemeralMessage;
use crate::types::{MessageText, PeerRef, Text};

impl Client {
    /// Replaces the caption of an ephemeral message that `receiver_user_id` sees.
    ///
    /// Awaiting the [`EditEphemeralMessage`] returns the edited
    /// [`EphemeralMessage`](crate::types::EphemeralMessage).
    pub fn edit_ephemeral_message_caption(
        &self,
        chat_id: impl Into<PeerRef>,
        receiver_user_id: impl Into<PeerRef>,
        ephemeral_message_id: i32,
        caption: impl Into<Text>,
    ) -> EditEphemeralMessage<'_> {
        EditEphemeralMessage::new(self, chat_id.into(), receiver_user_id.into(), ephemeral_message_id)
            .text(MessageText::Text(caption.into()))
    }
}