Skip to main content

ronami_core/payloads/
edit_ephemeral_message_text.rs

1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::{
6    InlineKeyboardMarkup, InputRichMessage, LinkPreviewOptions, MessageEntity, MessageId,
7    ParseMode, Recipient, True, UserId,
8};
9
10impl_payload! {
11    /// Use this method to edit an ephemeral text or rich message. Note that it is not guaranteed that the user will receive the message edit event, especially if they are offline. On success, True is returned.
12    #[derive(Debug, PartialEq, Clone, Serialize)]
13    pub EditEphemeralMessageText (EditEphemeralMessageTextSetters) => True {
14        required {
15            /// Unique identifier for the target chat or username of the target supergroup in the format `@username`
16            pub chat_id: Recipient [into],
17            /// Identifier of the user who received the message
18            pub receiver_user_id: UserId,
19            /// Identifier of the ephemeral message to edit
20            #[serde(flatten)]
21            pub ephemeral_message_id: MessageId,
22        }
23        optional {
24            /// New text of the message, 1-4096 characters after entity parsing; required if rich_message isn't specified
25            pub text: String [into],
26            /// Mode for parsing entities in the message text. See [formatting options] for more details.
27            ///
28            /// [formatting options]: https://core.telegram.org/bots/api#formatting-options
29            pub parse_mode: ParseMode,
30            /// A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode
31            pub entities: Vec<MessageEntity> [collect],
32            /// New rich content of the message; required if text isn't specified
33            pub rich_message: InputRichMessage,
34            /// Link preview generation options for the message
35            pub link_preview_options: LinkPreviewOptions,
36            /// A JSON-serialized object for an inline keyboard
37            pub reply_markup: InlineKeyboardMarkup,
38        }
39    }
40}