Message.edit_text()¶
- async Message.edit_text()[source]¶
Shortcut for method
edit_message_textwill automatically fill method attributes:chat_id
message_id
business_connection_id
Example
await message.edit_text("hello")
- Parameters:
text (
str) – New text of the message.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) – List of special entities that appear in message text, which can be specified instead of parse_mode.link_preview_options (
LinkPreviewOptions, optional) – Options used for link preview generation for the message.rich_text (
str|InputRichMessage, optional) – Rich content to send, as Markdown or HTML text or as a wholeInputRichMessage.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.
- Returns:
On success, the edited
Messageis returned.- Raises:
RPCError – In case of a Telegram RPC error.