Message.edit()¶
- Message.edit()¶
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.reply_markup (
InlineKeyboardMarkup, optional) – An InlineKeyboardMarkup object.
- Returns:
On success, the edited
Messageis returned.- Raises:
RPCError – In case of a Telegram RPC error.