view_messages()

async Client.view_messages()

Increment the view counter of one or more messages.

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

  • message_id (int | Iterable of int) – Pass a single message identifier or an iterable of message ids to view.

  • increment (bool, optional) – Pass False to only read the view counters without incrementing them. Defaults to True.

Returns:

bool – On success, True is returned.

Example

await app.view_messages(chat_id, 12345)