get_common_chats()¶
- async Client.get_common_chats()¶
Get the common chats you have with a 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:
List of
Chat
– On success, a list of the common chats is returned.- Raises:
ValueError – If the user_id doesn’t belong to a user.
Example
common = await app.get_common_chats(user_id) print(common)