get_chat_members_count()#
- Client.get_chat_members_count()#
Get the number of members in a chat.
Usable by Users Bots- Parameters:
chat_id (
int
|str
) – Unique identifier (int) or username (str) of the target chat.- Returns:
int
– On success, the chat members count is returned.- Raises:
ValueError – In case a chat id belongs to user.
Example
count = await app.get_chat_members_count(chat_id) print(count)