Message.edit_ephemeral_caption()

async Message.edit_ephemeral_caption()[source]

Shortcut for method edit_ephemeral_message_caption will automatically fill method attributes:

  • chat_id

  • receiver_id

  • message_id

Example

await message.edit_ephemeral_caption("new caption")
Parameters:
  • 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 together.

  • 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 InlineKeyboardMarkup object.

  • 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.