
    > /i*                     B    d Z ddlmZ ddlmZ ddlmZ  G d de      Zy)zSThis module contains the class which represents a Telegram ChatAdministratorRights.    )Optional)TelegramObject)JSONDictc            $            e Zd ZdZdZ	 	 	 	 	 	 	 ddddedededed	ed
edededee   dee   dee   dee   dee   dee   dee   dee   ddf" fdZe	dd       Z
e	dd       Z xZS )ChatAdministratorRightsa  Represents the rights of an administrator in a chat.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`is_anonymous`, :attr:`can_manage_chat`,
    :attr:`can_delete_messages`, :attr:`can_manage_video_chats`, :attr:`can_restrict_members`,
    :attr:`can_promote_members`, :attr:`can_change_info`, :attr:`can_invite_users`,
    :attr:`can_post_messages`, :attr:`can_edit_messages`, :attr:`can_pin_messages`,
    :attr:`can_manage_topics`, :attr:`can_post_stories`, :attr:`can_delete_stories`, and
    :attr:`can_edit_stories` are equal.

    .. versionadded:: 20.0

    .. versionchanged:: 20.0
        :attr:`can_manage_topics` is considered as well when comparing objects of
        this type in terms of equality.

    .. versionchanged:: 20.6
        :attr:`can_post_stories`, :attr:`can_edit_stories`, and :attr:`can_delete_stories` are
        considered as well when comparing objects of this type in terms of equality.

    Args:
        is_anonymous (:obj:`bool`): :obj:`True`, if the user's presence in the chat is hidden.
        can_manage_chat (:obj:`bool`): :obj:`True`, if the administrator can access the chat event
            log, chat statistics, boost list in channels, see channel members, report spam
            messages, see anonymous administrators in supergroups and ignore slow mode.
            Implied by any other administrator privilege.
        can_delete_messages (:obj:`bool`): :obj:`True`, if the administrator can delete messages of
            other users.
        can_manage_video_chats (:obj:`bool`): :obj:`True`, if the administrator can manage video
            chats.
        can_restrict_members (:obj:`bool`): :obj:`True`, if the administrator can restrict, ban or
            unban chat members, or access supergroup statistics.
        can_promote_members (:obj:`bool`): :obj:`True`, if the administrator can add new
            administrators with a subset of their own privileges or demote administrators
            that they have promoted, directly or indirectly (promoted by administrators that
            were appointed by the user).
        can_change_info (:obj:`bool`): :obj:`True`, if the user is allowed to change the chat title
            ,photo and other settings.
        can_invite_users (:obj:`bool`): :obj:`True`, if the user is allowed to invite new users to
            the chat.
        can_post_messages (:obj:`bool`, optional): :obj:`True`, if the administrator can post
            messages in the channel, or access channel statistics; channels only.
        can_edit_messages (:obj:`bool`, optional): :obj:`True`, if the administrator can edit
            messages of other users.
        can_pin_messages (:obj:`bool`, optional): :obj:`True`, if the user is allowed to pin
            messages; groups and supergroups only.
        can_post_stories (:obj:`bool`, optional): :obj:`True`, if the administrator can post
            stories in the channel; channels only.

            .. versionadded:: 20.6
        can_edit_stories (:obj:`bool`, optional): :obj:`True`, if the administrator can edit
            stories posted by other users; channels only.

            .. versionadded:: 20.6
        can_delete_stories (:obj:`bool`, optional): :obj:`True`, if the administrator can delete
            stories posted by other users; channels only.

            .. versionadded:: 20.6
        can_manage_topics (:obj:`bool`, optional): :obj:`True`, if the user is allowed
            to create, rename, close, and reopen forum topics; supergroups only.

            .. versionadded:: 20.0

    Attributes:
        is_anonymous (:obj:`bool`): :obj:`True`, if the user's presence in the chat is hidden.
        can_manage_chat (:obj:`bool`): :obj:`True`, if the administrator can access the chat event
            log, chat statistics, boost list in channels, see channel members, report spam
            messages, see anonymous administrators in supergroups and ignore slow mode.
            Implied by any other administrator privilege.
        can_delete_messages (:obj:`bool`): :obj:`True`, if the administrator can delete messages of
            other users.
        can_manage_video_chats (:obj:`bool`): :obj:`True`, if the administrator can manage video
            chats.
        can_restrict_members (:obj:`bool`): :obj:`True`, if the administrator can restrict, ban or
            unban chat members, or access supergroup statistics.
        can_promote_members (:obj:`bool`): :obj:`True`, if the administrator can add new
            administrators with a subset of their own privileges or demote administrators that he
            has promoted, directly or indirectly (promoted by administrators that were appointed by
            the user.)
        can_change_info (:obj:`bool`): :obj:`True`, if the user is allowed to change the chat title
            ,photo and other settings.
        can_invite_users (:obj:`bool`): :obj:`True`, if the user is allowed to invite new users to
            the chat.
        can_post_messages (:obj:`bool`): Optional. :obj:`True`, if the administrator can post
            messages in the channel, or access channel statistics; channels only.
        can_edit_messages (:obj:`bool`): Optional. :obj:`True`, if the administrator can edit
            messages of other users.
        can_pin_messages (:obj:`bool`): Optional. :obj:`True`, if the user is allowed to pin
            messages; groups and supergroups only.
        can_post_stories (:obj:`bool`): Optional. :obj:`True`, if the administrator can post
            stories in the channel; channels only.

            .. versionadded:: 20.6
        can_edit_stories (:obj:`bool`): Optional. :obj:`True`, if the administrator can edit
            stories posted by other users; channels only.

            .. versionadded:: 20.6
        can_delete_stories (:obj:`bool`): Optional. :obj:`True`, if the administrator can delete
            stories posted by other users; channels only.

            .. versionadded:: 20.6
        can_manage_topics (:obj:`bool`): Optional. :obj:`True`, if the user is allowed
            to create, rename, close, and reopen forum topics; supergroups only.

            .. versionadded:: 20.0
    )is_anonymouscan_manage_chatcan_delete_messagescan_manage_video_chatscan_restrict_memberscan_promote_memberscan_change_infocan_invite_userscan_post_messagescan_edit_messagescan_pin_messagescan_manage_topicscan_post_storiescan_edit_storiescan_delete_storiesN
api_kwargsr   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   returnc                p   t         |   |       || _        || _        || _        || _        || _        || _        || _        || _	        |	| _
        |
| _        || _        || _        || _        || _        || _        | j                  | j                  | j                  | j
                  | j                  | j                  | j                  | j                  | j                  | j                  | j                  | j                   | j                  | j                  | j                  f| _        | j%                          y )Nr   )super__init__r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   	_id_attrs_freeze)selfr   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   	__class__s                    W/srv/sistema/bot/venv/lib/python3.12/site-packages/telegram/_chatadministratorrights.pyr   z ChatAdministratorRights.__init__   s*   ( 	J/".%4)< ,B#*>!)< %4&61B1B0@0@0@2D1B   $$''%%$$  !!""""!!""!!!!##
$ 	    c                 8     | dt        | j                        z   S )a1  
        This method returns the :class:`ChatAdministratorRights` object with all attributes set to
        :obj:`True`. This is e.g. useful when changing the bot's default administrator rights with
        :meth:`telegram.Bot.set_my_default_administrator_rights`.

        .. versionadded:: 20.0
        )Tlen	__slots__clss    r!   
all_rightsz"ChatAdministratorRights.all_rights   s     Gc#--0011r"   c                 8     | dt        | j                        z   S )z
        This method returns the :class:`ChatAdministratorRights` object with all attributes set to
        :obj:`False`.

        .. versionadded:: 20.0
        )Fr$   r'   s    r!   	no_rightsz!ChatAdministratorRights.no_rights   s     Hs3==1122r"   )NNNNNNN)r   r   )__name__
__module____qualname____doc__r&   boolr   r   r   classmethodr)   r+   __classcell__)r    s   @r!   r   r      s)   iVI8 -1,0+/,0+/+/-1!9$ *.%99 9 "	9
 !%9 #9 "9 9 9 $D>9 $D>9 #4.9 $D>9 #4.9 #4.9  %TN!9$ X&%9& 
'9v 2 2 3 3r"   r   N)r/   typingr   telegram._telegramobjectr   telegram._utils.typesr   r    r"   r!   <module>r7      s"   & Z  3 *L3n L3r"   