pub struct EditMessageTextRequest<'a> { /* private fields */ }Expand description
Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True 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.
Implementations§
Source§impl<'a> EditMessageTextRequest<'a>
impl<'a> EditMessageTextRequest<'a>
pub fn new(api: &'a API, text: impl Into<String>) -> Self
Sourcepub fn business_connection_id(
self,
business_connection_id: impl Into<String>,
) -> Self
pub fn business_connection_id( self, business_connection_id: impl Into<String>, ) -> Self
Unique identifier of the business connection on behalf of which the message to be edited was sent
Sourcepub fn chat_id(self, chat_id: impl Into<ChatId>) -> Self
pub fn chat_id(self, chat_id: impl Into<ChatId>) -> Self
Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername)
Sourcepub fn message_id(self, message_id: impl Into<i64>) -> Self
pub fn message_id(self, message_id: impl Into<i64>) -> Self
Required if inline_message_id is not specified. Identifier of the message to edit
Sourcepub fn inline_message_id(self, inline_message_id: impl Into<String>) -> Self
pub fn inline_message_id(self, inline_message_id: impl Into<String>) -> Self
Required if chat_id and message_id are not specified. Identifier of the inline message
Sourcepub fn text(self, text: impl Into<String>) -> Self
pub fn text(self, text: impl Into<String>) -> Self
New text of the message, 1-4096 characters after entities parsing
Sourcepub fn parse_mode(self, parse_mode: impl Into<String>) -> Self
pub fn parse_mode(self, parse_mode: impl Into<String>) -> Self
Mode for parsing entities in the message text. See formatting options for more details.
Sourcepub fn entities(
self,
entities: impl IntoIterator<Item = impl Into<MessageEntity>>,
) -> Self
pub fn entities( self, entities: impl IntoIterator<Item = impl Into<MessageEntity>>, ) -> Self
A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode
Sourcepub fn link_preview_options(
self,
link_preview_options: impl Into<LinkPreviewOptions>,
) -> Self
pub fn link_preview_options( self, link_preview_options: impl Into<LinkPreviewOptions>, ) -> Self
Link preview generation options for the message
Sourcepub fn reply_markup(self, reply_markup: impl Into<InlineKeyboardMarkup>) -> Self
pub fn reply_markup(self, reply_markup: impl Into<InlineKeyboardMarkup>) -> Self
A JSON-serialized object for an inline keyboard.
Source§impl EditMessageTextRequest<'_>
impl EditMessageTextRequest<'_>
pub fn remove_reply_markup(self) -> Self
Sourcepub fn disable_web_page_preview(self, disable: bool) -> Self
pub fn disable_web_page_preview(self, disable: bool) -> Self
For backwards compatibility (Bot API < 7.0)
Trait Implementations§
Source§impl<'a> Clone for EditMessageTextRequest<'a>
impl<'a> Clone for EditMessageTextRequest<'a>
Source§fn clone(&self) -> EditMessageTextRequest<'a>
fn clone(&self) -> EditMessageTextRequest<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more