edit_ephemeral_message_caption()

async Client.edit_ephemeral_message_caption()

Edit the caption of an ephemeral media message.

Usable by Users Bots
Parameters:
  • chat_id (int | str) – Unique identifier (int) or username (str) of the target chat.

  • receiver_id (int | str) – Unique identifier (int) or username (str) of the user the ephemeral message was sent to.

  • message_id (int) – Identifier of the ephemeral message to edit.

  • caption (str) – New caption of the message.

  • parse_mode (ParseMode, optional) – By default, texts are parsed using both Markdown and HTML styles. You can combine both syntaxes.

  • caption_entities (List of MessageEntity, optional) – List of special entities that appear in the caption, which can be specified instead of parse_mode.

  • show_caption_above_media (bool, optional) – Pass True if the caption must be shown above the message media.

  • reply_markup (InlineKeyboardMarkup, optional) – An inline keyboard.

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

Returns:

Message – On success, the edited message is returned.

Example

await app.edit_ephemeral_message_caption(
    chat_id, receiver_id, message_id, "New caption"
)