Skip to main content

ronami_core/payloads/
edit_message_caption.rs

1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use serde::Serialize;
4
5use crate::types::BusinessConnectionId;
6use crate::types::InlineKeyboardMarkup;
7use crate::types::Message;
8use crate::types::MessageEntity;
9use crate::types::MessageId;
10use crate::types::ParseMode;
11use crate::types::Recipient;
12
13impl_payload! {
14    /// Use this method to edit captions of messages. On success, the edited Message is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent.
15    ///
16    /// See also: [`EditMessageCaptionInline`](crate::payloads::EditMessageCaptionInline)
17    #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
18    pub EditMessageCaption (EditMessageCaptionSetters) => Message {
19        required {
20            /// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`).
21            pub chat_id: Recipient [into],
22            /// Identifier of the message to edit
23            #[serde(flatten)]
24            pub message_id: MessageId,
25        }
26        optional {
27            /// Unique identifier of the business connection on behalf of which the message to be edited was sent
28            pub business_connection_id: BusinessConnectionId,
29            /// New caption of the message, 0-1024 characters after entities parsing
30            pub caption: String [into],
31            /// Mode for parsing entities in the message text. See [formatting options] for more details.
32            ///
33            /// [formatting options]: https://core.telegram.org/bots/api#formatting-options
34            pub parse_mode: ParseMode,
35            /// List of special entities that appear in the caption, which can be specified instead of _parse\_mode_
36            pub caption_entities: Vec<MessageEntity> [collect],
37            /// Pass True, if the caption must be shown above the message media. Supported only for animation, photo and video messages
38            pub show_caption_above_media: bool,
39            /// A JSON-serialized object for an [inline keyboard].
40            ///
41            /// [inline keyboard]: https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating
42            pub reply_markup: InlineKeyboardMarkup,
43        }
44    }
45}