Skip to main content

teloxide_core_ng/payloads/
edit_message_text.rs

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