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