get_dialogs_count()

Client.get_dialogs_count()

Get the total count of your dialogs.

Usable by Users Bots
Parameters:
  • pinned_only (bool, optional) – Pass True if you want to count only pinned dialogs. Defaults to False.

  • chat_list (int, optional) – Chat list from which to get the dialogs; Only Main (0) and Archive (1) chat lists are supported. Defaults to (0) Main chat list.

Returns:

int – On success, the dialogs count is returned.

Example

count = await app.get_dialogs_count()
print(count)