edit_inline_text()¶
- async Client.edit_inline_text()¶
Edit the text of inline messages.
Usable by Users Bots- Parameters:
inline_message_id (
str) – Identifier of the inline message.text (
str, optional) – New text of the message. Required if rich_text is not given, and ignored when it is.parse_mode (
ParseMode, optional) – By default, texts are parsed using both Markdown and HTML styles. You can combine both syntaxes together.entities (List of
MessageEntity, optional) – List of special entities that appear in the new text, which can be specified instead of parse_mode.link_preview_options (
LinkPreviewOptions, optional) – Link preview generation options for the message.disable_web_page_preview (
bool, optional) – Disables link previews for links in this message.rich_text (
str|InputRichMessage, optional) – New rich content of the message, as Markdown or HTML text or as a wholeInputRichMessage. Replaces text.rich_text_parse_mode (
ParseMode, optional) – Parse mode for rich_text. Defaults to Markdown. Ignored when rich_text is anInputRichMessage.rich_text_media (List of
InputRichMessageMedia, optional) – Media rich_text refers to throughtg://photo?id=,tg://video?id=ortg://audio?id=links. Ignored when rich_text is anInputRichMessage.reply_markup (
InlineKeyboardMarkup, optional) – An InlineKeyboardMarkup object. Pass None to remove the existing reply markup.show_caption_above_media (
bool, optional) – Pass True, if the caption must be shown above the message media.business_connection_id (
str, optional) – Unique identifier of the business connection.
- Returns:
bool– On success, True is returned.
Example
# Bots only # Simple edit text await app.edit_inline_text(inline_message_id, "new text") # Take the same text message, remove the web page preview only await app.edit_inline_text( inline_message_id, message.text, disable_web_page_preview=True)