Message.edit_text()¶
- Message.edit_text()¶
Bound method edit_text of
Message.An alias exists as edit.
Use as a shortcut for:
await client.edit_message_text( chat_id=message.chat.id, message_id=message.id, text="hello" )Example
await message.edit_text("hello")- Parameters:¶
text (``str``) – New text of the message.
parse_mode (:obj:`~pyrogram.enums.ParseMode`, *optional*) – By default, texts are parsed using both Markdown and HTML styles. You can combine both syntaxes together.
entities (List of :obj:`~pyrogram.types.MessageEntity`) – List of special entities that appear in message text, which can be specified instead of parse_mode.
link_preview_options (:obj:`~pyrogram.types.LinkPreviewOptions`, *optional*) – Link preview generation options for the message
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*) – An InlineKeyboardMarkup object.
- Returns:¶
On success, the edited
Messageis returned.- Raises:¶
RPCError –