U
    ;gW                     @   s>   d dl mZ d dlZd dlmZ d dlmZ G dd dZdS )    )UnionN)raw)typesc                   @   s(   e Zd Zdeeef dddddZdS )SetChatPermissionszpyrogram.Clientztypes.ChatPermissionsz
types.Chat)selfchat_idpermissionsreturnc                    s   |  tjjj| |I dH tjjd|j |j	 |j
 |j
 |j
 |j
 |j |j |j |j |j ddI dH }tj| |jd S )a  Set default chat permissions for all members.

        You must be an administrator in the group or a supergroup for this to work and must have the
        *can_restrict_members* admin rights.

        .. include:: /_includes/usable-by/users-bots.rst

        Parameters:
            chat_id (``int`` | ``str``):
                Unique identifier (int) or username (str) of the target chat.

            permissions (:obj:`~pyrogram.types.ChatPermissions`):
                New default chat permissions.

        Returns:
            :obj:`~pyrogram.types.Chat`: On success, a chat object is returned.

        Example:
            .. code-block:: python

                from pyrogram.types import ChatPermissions

                # Completely restrict chat
                await app.set_chat_permissions(chat_id, ChatPermissions())

                # Chat members can only send text messages and media messages
                await app.set_chat_permissions(
                    chat_id,
                    ChatPermissions(
                        can_send_messages=True,
                        can_send_media_messages=True
                    )
                )
        Nr   )Z
until_dateZsend_messagesZ
send_mediaZsend_stickersZ	send_gifsZ
send_gamesZsend_inlineZembed_linksZ
send_pollsZchange_infoZinvite_usersZpin_messages)ZpeerZbanned_rights)Zinvoker   Z	functionsmessagesZEditChatDefaultBannedRightsZresolve_peerr   ZChatBannedRightsZcan_send_messagesZcan_send_media_messagesZcan_send_other_messagesZcan_add_web_page_previewsZcan_send_pollsZcan_change_infoZcan_invite_usersZcan_pin_messagesZChatZ_parse_chatZchats)r   r   r   r r   k/opt/bot/vods_filmes/script/venv/lib/python3.8/site-packages/pyrogram/methods/chats/set_chat_permissions.pyset_chat_permissions   s(    (
z'SetChatPermissions.set_chat_permissionsN)__name__
__module____qualname__r   intstrr   r   r   r   r   r      s
   
r   )typingr   Zpyrogramr   r   r   r   r   r   r   <module>   s   