U
    2Òtcw  ã                   @   s0   d Z ddlmZ ddlmZ G dd„ deƒZdS )zIThis module contains an object that represents a Telegram ChatPermission.é    )ÚAny)ÚTelegramObjectc                   @   s4   e Zd ZdZdZdeeeeeeeeedœ	dd„ZdS )ÚChatPermissionsaÅ  Describes actions that a non-administrator user is allowed to take in a chat.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`can_send_messages`, :attr:`can_send_media_messages`,
    :attr:`can_send_polls`, :attr:`can_send_other_messages`, :attr:`can_add_web_page_previews`,
    :attr:`can_change_info`, :attr:`can_invite_users` and :attr:`can_pin_messages` are equal.

    Note:
        Though not stated explicitly in the official docs, Telegram changes not only the
        permissions that are set, but also sets all the others to :obj:`False`. However, since not
        documented, this behaviour may change unbeknown to PTB.

    Args:
        can_send_messages (:obj:`bool`, optional): :obj:`True`, if the user is allowed to send text
            messages, contacts, locations and venues.
        can_send_media_messages (:obj:`bool`, optional): :obj:`True`, if the user is allowed to
            send audios, documents, photos, videos, video notes and voice notes, implies
            :attr:`can_send_messages`.
        can_send_polls (:obj:`bool`, optional): :obj:`True`, if the user is allowed to send polls,
            implies :attr:`can_send_messages`.
        can_send_other_messages (:obj:`bool`, optional): :obj:`True`, if the user is allowed to
            send animations, games, stickers and use inline bots, implies
            :attr:`can_send_media_messages`.
        can_add_web_page_previews (:obj:`bool`, optional): :obj:`True`, if the user is allowed to
            add web page previews to their messages, implies :attr:`can_send_media_messages`.
        can_change_info (:obj:`bool`, optional): :obj:`True`, if the user is allowed to change the
            chat title, photo and other settings. Ignored in public supergroups.
        can_invite_users (:obj:`bool`, optional): :obj:`True`, if the user is allowed to invite new
            users to the chat.
        can_pin_messages (:obj:`bool`, optional): :obj:`True`, if the user is allowed to pin
            messages. Ignored in public supergroups.

    Attributes:
        can_send_messages (:obj:`bool`): Optional. :obj:`True`, if the user is allowed to send text
            messages, contacts, locations and venues.
        can_send_media_messages (:obj:`bool`): Optional. :obj:`True`, if the user is allowed to
            send audios, documents, photos, videos, video notes and voice notes, implies
            :attr:`can_send_messages`.
        can_send_polls (:obj:`bool`): Optional. :obj:`True`, if the user is allowed to send polls,
            implies :attr:`can_send_messages`.
        can_send_other_messages (:obj:`bool`): Optional. :obj:`True`, if the user is allowed to
            send animations, games, stickers and use inline bots, implies
            :attr:`can_send_media_messages`.
        can_add_web_page_previews (:obj:`bool`): Optional. :obj:`True`, if the user is allowed to
            add web page previews to their messages, implies :attr:`can_send_media_messages`.
        can_change_info (:obj:`bool`): Optional. :obj:`True`, if the user is allowed to change the
            chat title, photo and other settings. Ignored in public supergroups.
        can_invite_users (:obj:`bool`): Optional. :obj:`True`, if the user is allowed to invite
            new users to the chat.
        can_pin_messages (:obj:`bool`): Optional. :obj:`True`, if the user is allowed to pin
            messages. Ignored in public supergroups.

    )	Úcan_send_other_messagesÚcan_invite_usersÚcan_send_pollsÚ	_id_attrsÚcan_send_messagesÚcan_send_media_messagesÚcan_change_infoÚcan_pin_messagesÚcan_add_web_page_previewsN)	r	   r
   r   r   r   r   r   r   Ú_kwargsc	           
      K   sZ   || _ || _|| _|| _|| _|| _|| _|| _| j | j| j| j| j| j| j| jf| _d S )N)	r	   r
   r   r   r   r   r   r   r   )
Úselfr	   r
   r   r   r   r   r   r   r   © r   ú</tmp/pip-unpacked-wheel-2u9rcp5s/telegram/chatpermissions.pyÚ__init__]   s"    øzChatPermissions.__init__)NNNNNNNN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__Úboolr   r   r   r   r   r   r      s*   6        ÷ör   N)r   Útypingr   Ztelegramr   r   r   r   r   r   Ú<module>   s   