get_rich_message()

async Client.get_rich_message()

Get the full rich message of a message that arrived truncated.

A rich message larger than the inline byte limit is delivered with only its first blocks and is_partial set on its RichMessage; this fetches the whole of it.

Usable by Users Bots
Parameters:
  • chat_id (int | str) – Unique identifier (int) or username (str) of the target chat. For your personal cloud (Saved Messages) you can simply use “me” or “self”.

  • message_id (int) – Unique identifier of the message whose rich message is to be fetched.

Returns:

Message – On success, the message with its complete rich_message is returned.

Example

if message.rich_message.is_partial:
    message = await app.get_rich_message(message.chat.id, message.id)