get_user_personal_chat_messages_count()#

Client.get_user_personal_chat_messages_count()[source]#

Use this method to get the count of the messages from the personal chat (i.e., the chat currently added to their profile) of a given user.

Usable by Users Bots
Parameters:

user_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”. For a contact that exists in your Telegram address book you can use his phone number (str).

Returns:

int – Number of messages in the personal chat of the given user.