Skip to main content

ronami_core/payloads/
edit_message_text.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::InputRichMessage;
8use crate::types::LinkPreviewOptions;
9use crate::types::Message;
10use crate::types::MessageEntity;
11use crate::types::MessageId;
12use crate::types::ParseMode;
13use crate::types::Recipient;
14
15impl_payload! {
16    /// Use this method to edit text and [games] 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.
17    ///
18    /// See also: [`EditMessageTextInline`](crate::payloads::EditMessageTextInline)
19    ///
20    /// [games]: https://core.telegram.org/bots/api#games
21    #[derive(Debug, PartialEq, Clone, Serialize)]
22    pub EditMessageText (EditMessageTextSetters) => Message {
23        required {
24            /// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`).
25            pub chat_id: Recipient [into],
26            /// Identifier of the message to edit
27            #[serde(flatten)]
28            pub message_id: MessageId,
29            /// New text of the message, 1-4096 characters after entities parsing
30            pub text: String [into],
31        }
32        optional {
33            /// Unique identifier of the business connection on behalf of which the message to be edited was sent
34            pub business_connection_id: BusinessConnectionId,
35            /// Mode for parsing entities in the message text. See [formatting options] for more details.
36            ///
37            /// [formatting options]: https://core.telegram.org/bots/api#formatting-options
38            pub parse_mode: ParseMode,
39            /// List of special entities that appear in message text, which can be specified instead of _parse\_mode_
40            pub entities: Vec<MessageEntity> [collect],
41            /// Link preview generation options for the message
42            pub link_preview_options: LinkPreviewOptions,
43            /// New rich content of the message; required if _text_ isn't specified
44            pub rich_message: InputRichMessage,
45            /// A JSON-serialized object for an [inline keyboard].
46            ///
47            /// [inline keyboard]: https://core.telegram.org/bots#inline-keyboards-and-on-the-fly-updating
48            pub reply_markup: InlineKeyboardMarkup,
49        }
50    }
51}