Message.edit_ephemeral_text()

async Message.edit_ephemeral_text()[source]

Shortcut for method edit_ephemeral_message_text will automatically fill method attributes:

  • chat_id

  • receiver_id

  • message_id

Example

await message.edit_ephemeral_text("hello")
Parameters:
  • text (str, optional) – New text of the message. Required if rich_text is not given.

  • 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 message text, which can be specified instead of parse_mode.

  • rich_text (str | InputRichMessage, optional) – Rich content to send, as Markdown or HTML text or as a whole InputRichMessage.

  • rich_text_parse_mode (ParseMode, optional) – Parse mode for rich_text. Defaults to Markdown. Ignored when rich_text is an InputRichMessage.

  • rich_text_media (List of InputRichMessageMedia, optional) – Media rich_text refers to through tg://photo?id=, tg://video?id= or tg://audio?id= links. Ignored when rich_text is an InputRichMessage.

  • rich_message (InputRichMessage, optional) – Deprecated alias of rich_text.

  • reply_markup (InlineKeyboardMarkup, optional) – An InlineKeyboardMarkup object. Pass None to remove the existing reply markup.

  • welcome (bool, optional) – Pass True when editing a stored welcome message rather than one that was delivered once.

Returns:

On success, the edited Message is returned.

Raises:
  • ValueError – In case the message is not an ephemeral one.

  • RPCError – In case of a Telegram RPC error.