update_folder()¶
- Client.update_folder()¶
Create or update a user’s folder.
Usable by Users Bots
- Parameters:¶
folder_id (``int``) – Unique folder identifier.
title (``str``) – Folder title.
included_chats (``int`` | ``str`` | List of ``int`` or ``str``, *optional*) – Users or chats that should added in the folder You can pass an ID (int), username (str) or phone number (str). Multiple users can be added by passing a list of IDs, usernames or phone numbers.
excluded_chats (``int`` | ``str`` | List of ``int`` or ``str``, *optional*) – Users or chats that should excluded from the folder You can pass an ID (int), username (str) or phone number (str). Multiple users can be added by passing a list of IDs, usernames or phone numbers.
pinned_chats (``int`` | ``str`` | List of ``int`` or ``str``, *optional*) – Users or chats that should pinned in the folder You can pass an ID (int), username (str) or phone number (str). Multiple users can be added by passing a list of IDs, usernames or phone numbers.
contacts (``bool``, *optional*) – Pass True if folder should contain contacts.
non_contacts (``bool``, *optional*) – Pass True if folder should contain non contacts.
groups (``bool``, *optional*) – Pass True if folder should contain groups.
channels (``bool``, *optional*) – Pass True if folder should contain channels.
bots (``bool``, *optional*) – Pass True if folder should contain bots.
exclude_muted (``bool``, *optional*) – Pass True if folder should exclude muted users.
exclude_read (``bool``, *optional*) – Pass True if folder should exclude chats with no unread messages.
exclude_archived (``bool``, *optional*) – Pass True if folder should exclude archived users.
emoji (``str``, *optional*) – Folder emoji. Pass None to leave the folder icon as default.
color (:obj:`~pyrogram.enums.FolderColor`, *optional*) – Color type. Pass
FolderColorto set folder color.
- Returns:¶
``bool`` (True, on success.)
Example
# Create or update folder app.update_folder(folder_id, title="New folder", included_chats="me")