
    N[iW                     D    d dl mZ d dlZd dlmZ d dlmZ  G d d      Zy)    )UnionN)raw)typesc                   .    e Zd Zdddeeef   ddddfdZy	)
SetChatPermissionsselfzpyrogram.Clientchat_idpermissionsztypes.ChatPermissionsreturnz
types.Chatc                 b  K   | j                  t        j                  j                  j	                  | j                  |       d{   t        j                  j                  d|j                   |j                   |j                   |j                   |j                   |j                   |j                   |j                   |j                   |j                   |j                                      d{   }t        j                   j#                  | |j$                  d         S 7 7 3w)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   )
until_datesend_messages
send_mediasend_stickers	send_gifs
send_gamessend_inlineembed_links
send_pollschange_infoinvite_userspin_messages)peerbanned_rights)invoker   	functionsmessagesEditChatDefaultBannedRightsresolve_peerr   ChatBannedRightscan_send_messagescan_send_media_messagescan_send_other_messagescan_add_web_page_previewscan_send_pollscan_change_infocan_invite_userscan_pin_messagesChat_parse_chatchats)r   r	   r
   rs       ^/var/www/files/kim/lib/python3.12/site-packages/pyrogram/methods/chats/set_chat_permissions.pyset_chat_permissionsz'SetChatPermissions.set_chat_permissions   s    P ++MM"">>,,W55!ii88 &1&C&C"C#.#F#FF&1&I&I"I"-"E"EE#.#F#FF$/$G$G G$/$I$I I#.#=#==$/$?$? ?%0%A%A!A%0%A%A!A 9  ? 
 
( zz%%dAGGAJ77% 6
s%   AD/D+B3D/9D-:2D/-D/N)__name__
__module____qualname__r   intstrr.        r-   r   r      s3    <8<8sCx<8 -<8 
	<8r5   r   )typingr   pyrogramr   r   r   r4   r5   r-   <module>r8      s   &    =8 =8r5   