edit_ephemeral_message_media()

async Client.edit_ephemeral_message_media()

Edit the media of an ephemeral 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.

  • media (InputMedia) – The new media. A local file is uploaded first.

  • 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

from wzgram.types import InputMediaPhoto

await app.edit_ephemeral_message_media(
    chat_id, receiver_id, message_id, InputMediaPhoto("new.jpg")
)