get_chat_online_count()

Client.get_chat_online_count()

Get the number of members that are currently online in a chat.

Parameters

chat_id (int | str) – Unique identifier (int) or username (str) of the target chat.

Returns

int – On success, the chat members online count is returned.

Example

online = app.get_chat_online_count(chat_id)
print(online)