get_created_chats()¶
- Client.get_created_chats()¶
Get a list of chats of the specified type of the current user account.
Usable by Users Bots
Exactly one of
is_inactive_chatORis_my_public_has_usernameshould be passed.- Parameters:¶
is_inactive_chat (``bool``, *optional*) – True, to return a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives CHANNELS_TOO_MUCH error. Also, the limit can be increased with Telegram Premium. Defaults to False.
is_my_public_has_username (``bool``, *optional*) – True, if the chat is public, because it has an active username. Defaults to True.
is_my_public_location_based (``bool``, *optional*) – True, if the chat is public, because it is a location-based supergroup. Defaults to False.
check_created_my_public_chat_limit (``bool``, *optional*) – Checks whether the maximum number of owned public chats has been reached. The limit can be increased with Telegram Premium. Defaults to False.
is_suitable_for_my_personal_chat (``bool``, *optional*) – True, if the chat can be used as a personal chat. Defaults to False.
- Returns:¶
List of :obj:`~pyrogram.types.Chat` (The list of chats.)
Example
chats = await app.get_created_chats() print(chats)