Message.edit_media()

Message.edit_media()

Bound method edit_media of Message.

Use as a shortcut for:

await client.edit_message_media(
    chat_id=message.chat.id,
    message_id=message.id,
    media=media
)

Example

await message.edit_media(media)
Parameters:
  • media (InputMedia) – One of the InputMedia objects describing an animation, audio, document, photo or video.

  • invert_media (bool, optional) – Inverts the position of the media and caption.

  • reply_markup (InlineKeyboardMarkup, optional) – An InlineKeyboardMarkup object.

  • business_connection_id (str, optional) – Unique identifier of the business connection. for business bots only.

Returns:

On success, the edited Message is returned.

Raises:

RPCError – In case of a Telegram RPC error.