U
    2tc                     @   s"  d Z ddlZddlmZ ddlmZmZmZmZmZm	Z	m
Z
 ddlmZmZmZmZ ddlmZmZmZmZ ddlmZ dd	lmZ dd
lmZ ddlmZmZ erddlmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5 G dd deZ6dS )z?This module contains an object that represents a Telegram Chat.    N)datetime)TYPE_CHECKINGListOptionalClassVarUnionTupleAny)	ChatPhotoTelegramObject	constants
MenuButton)JSONDict	FileInputODVInputDVInput)TelegramDeprecationWarning   )ChatPermissions)ChatLocation)DEFAULT_NONE
DEFAULT_20)Bot
ChatMemberChatInviteLinkMessage	MessageIdReplyMarkupContactInlineKeyboardMarkupLocationVenueMessageEntityInputMediaAudioInputMediaDocumentInputMediaPhotoInputMediaVideo	PhotoSizeAudioDocument	AnimationLabeledPriceStickerVideo	VideoNoteVoicec                   @   sJ  e Zd ZU dZdZejZee	 e
d< ejZee	 e
d< ejZee	 e
d< ejZee	 e
d< ejZee	 e
d< dee	e	e	e	e	d	ee	e	d
ee	eee	eeeeeeeeedddZeee	 dddZeee	 dddZeee d	ed  dddZ e!dfe"e# eedddZ$e!dfe"e# ee%d dddZ&e!dfe"e# eedddZ'e!dfe"e# eedddZ(e!dfe)e	ef e"e# edd d!d"Z*e!dddfe)e	ef e"e# e)ee+f eeed#d$d%Z,e!dddfe)e	ef e"e# e)ee+f eeed#d&d'Z-e!dfee"e# eed(d)d*Z.e!dfe)e	ef e"e# eed+d,d-Z/e!dfee"e# eed(d.d/Z0e!dfe)e	ef e"e# eed+d0d1Z1e!ddfe)e	ef e"e# eeed2d3d4Z2dddddddde!dddddfe)e	ef eeeeeeeee"e# eeeeeed5d6d7Z3de!dfe)e	ef ee)ee+f e"e# eed8d9d:Z4e!dfee"e# eed;d<d=Z5e!dfe)ee	f e	e"e# eed>d?d@Z6e!e!dfee"e e"e# eedAdBdCZ7e!ddfe"e# eeedDdEdFZ8e!dfe"e# eeddGdHZ9e!e!e!dde!de!ddf
e	e"e	 e"e e:e edIe"e# ee"e e)e%dJ e;dK f ed
dLdMdNZ<e!de=de!dfe%e)dO  e"e ee:e# ee"e ee%d
 dPdQdRZ>e!dfe	e"e# eedSdTdUZ?e?Z@de!dde=e!de!dddfe)eAdVf e	e:e edIe:e# e"e	 ee"e e)e%dJ e;dK f e	ed
dWdXdYZBddde!dde!ddde!dfe	e	e	e:e edIe"e# dZe	ee"e ed
d[d\d]ZCdddde!dde=e!dde!dddfe)eAd^f ee	e	e	e:e edIe:e# e"e	 eAee"e e)e%dJ e;dK f e	ed
d_d`daZDdde!dde=e!ddde!ddfe)eAdbf e	e	e:e edIe:e# e"e	 eAeee"e e)e%dJ e;dK f ed
dcdddeZEe!dde!dde!dfe"e edIe"e# e	ee"e ed
df	dgdhZFe!dde!de!dfe	e:e edie"e# ee"e ed
dj	dkdlZGdddddddddde!ddddde!de!dddfe	e	e	e	e	e%dm e	e	eeeeeeeee:e edie)e	eHf eee"e# ee"e ee%e ed
dndodpZIdde!dde!dddddde!dfe#e#e:e edIe"e# dqeee#eee"e ed
drdsdtZJddddde!e!dde=de!dddfe)eAduf eeeeAe	e"e	 e:e edIe:e# ee"e e)e%dJ e;dK f e	ed
dvdwdxZKe!dde=de!dfe)eAdyf e:e edIe:e# ee"e ed
dz	d{d|ZLddddde!dde!ddddde!dfe#e#e	e	e	e:e edIe"e# d}e	ee	e	e"e ed
d~ddZMdde!dde=dde!ddde!dddfe)eAdf ee	e:e edIe:e# eee"e	 eeAee"e e)e%dJ e;dK f e	ed
dddZNdde!dde=dde!ddfe)eAdf eee:e edIe:e# eAee"e e	ed
dddZOdde!dde=e!de!dddfe)eAdf ee	e:e edIe:e# e"e	 ee"e e)e%dJ e;dK f e	ed
dddZPdejQddde!dde!de!ddde!ddfe	e%e	 ee	eeee"e edIe"e# e	e"e	 ee)ee+f ee"e e)e%dJ e;dK f ed
dddZRde!de!de!de!ddf
e)e	ef ee	e"e	 e)e;dK e%dJ f e:e ee:e dIe"e# eeddddZSde!de!de!de!ddf
e)ee	f ee	e"e	 e)e;dK e%dJ f e:e ee:e dIe"e# eeddddZTe!dfe"e# ee	dddZUdde!dddfe)ee+f ee"e# ee	eddddZVdde!dddfe	e)ee+f ee"e# ee	eddddZWe!dfe	e"e# eddddZXe!dfee"e# eed ddZYe!dfee"e# eed ddZZde!dfe[e"e# eedddZ\e!dfe"e# ee[dddZ]dS )Chata   This object represents a chat.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`id` is equal.

    Args:
        id (:obj:`int`): Unique identifier for this chat. This number may be greater than 32 bits
            and some programming languages may have difficulty/silent defects in interpreting it.
            But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float
            type are safe for storing this identifier.
        type (:obj:`str`): Type of chat, can be either 'private', 'group', 'supergroup' or
            'channel'.
        title (:obj:`str`, optional): Title, for supergroups, channels and group chats.
        username(:obj:`str`, optional): Username, for private chats, supergroups and channels if
            available.
        first_name(:obj:`str`, optional): First name of the other party in a private chat.
        last_name(:obj:`str`, optional): Last name of the other party in a private chat.
        photo (:class:`telegram.ChatPhoto`, optional): Chat photo.
            Returned only in :meth:`telegram.Bot.get_chat`.
        bio (:obj:`str`, optional): Bio of the other party in a private chat. Returned only in
            :meth:`telegram.Bot.get_chat`.
        has_private_forwards (:obj:`bool`, optional): :obj:`True`, if privacy settings of the other
            party in the private chat allows to use ``tg://user?id=<user_id>`` links only in chats
            with the user. Returned only in :meth:`telegram.Bot.get_chat`.

            .. versionadded:: 13.9
        description (:obj:`str`, optional): Description, for groups, supergroups and channel chats.
            Returned only in :meth:`telegram.Bot.get_chat`.
        invite_link (:obj:`str`, optional): Primary invite link, for groups, supergroups and
            channel. Returned only in :meth:`telegram.Bot.get_chat`.
        pinned_message (:class:`telegram.Message`, optional): The most recent pinned message
            (by sending date). Returned only in :meth:`telegram.Bot.get_chat`.
        permissions (:class:`telegram.ChatPermissions`): Optional. Default chat member permissions,
            for groups and supergroups. Returned only in :meth:`telegram.Bot.get_chat`.
        slow_mode_delay (:obj:`int`, optional): For supergroups, the minimum allowed delay between
            consecutive messages sent by each unprivileged user.
            Returned only in :meth:`telegram.Bot.get_chat`.
        message_auto_delete_time (:obj:`int`, optional): The time after which all messages sent to
            the chat will be automatically deleted; in seconds. Returned only in
            :meth:`telegram.Bot.get_chat`.

            .. versionadded:: 13.4
        has_protected_content (:obj:`bool`, optional): :obj:`True`, if messages from the chat can't
            be forwarded to other chats. Returned only in :meth:`telegram.Bot.get_chat`.

            .. versionadded:: 13.9
        bot (:class:`telegram.Bot`, optional): The Bot to use for instance methods.
        sticker_set_name (:obj:`str`, optional): For supergroups, name of group sticker set.
            Returned only in :meth:`telegram.Bot.get_chat`.
        can_set_sticker_set (:obj:`bool`, optional): :obj:`True`, if the bot can change group the
            sticker set. Returned only in :meth:`telegram.Bot.get_chat`.
        linked_chat_id (:obj:`int`, optional): Unique identifier for the linked chat, i.e. the
            discussion group identifier for a channel and vice versa; for supergroups and channel
            chats. Returned only in :meth:`telegram.Bot.get_chat`.
        location (:class:`telegram.ChatLocation`, optional): For supergroups, the location to which
            the supergroup is connected. Returned only in :meth:`telegram.Bot.get_chat`.
        join_to_send_messages (:obj:`bool`, optional): :obj:`True`, if users need to join the
            supergroup before they can send messages. Returned only in
            :meth:`telegram.Bot.get_chat`.

            .. versionadded:: 13.13
        join_by_request (:obj:`bool`, optional): :obj:`True`, if all users directly joining the
            supergroup need to be approved by supergroup administrators. Returned only in
            :meth:`telegram.Bot.get_chat`.

            .. versionadded:: 13.13
        has_restricted_voice_and_video_messages (:obj:`bool`, optional): :obj:`True`, if the
            privacy settings of the other party restrict sending voice and video note messages
            in the private chat. Returned only in :meth:`telegram.Bot.get_chat`.

            .. versionadded:: 13.14
        **kwargs (:obj:`dict`): Arbitrary keyword arguments.

    Attributes:
        id (:obj:`int`): Unique identifier for this chat.
        type (:obj:`str`): Type of chat.
        title (:obj:`str`): Optional. Title, for supergroups, channels and group chats.
        username (:obj:`str`): Optional. Username.
        first_name (:obj:`str`): Optional. First name of the other party in a private chat.
        last_name (:obj:`str`): Optional. Last name of the other party in a private chat.
        photo (:class:`telegram.ChatPhoto`): Optional. Chat photo.
        bio (:obj:`str`): Optional. Bio of the other party in a private chat. Returned only in
            :meth:`telegram.Bot.get_chat`.
        has_private_forwards (:obj:`bool`): Optional. :obj:`True`, if privacy settings of the other
            party in the private chat allows to use ``tg://user?id=<user_id>`` links only in chats
            with the user.

            .. versionadded:: 13.9
        description (:obj:`str`): Optional. Description, for groups, supergroups and channel chats.
        invite_link (:obj:`str`): Optional. Primary invite link, for groups, supergroups and
            channel. Returned only in :meth:`telegram.Bot.get_chat`.
        pinned_message (:class:`telegram.Message`): Optional. The most recent pinned message
            (by sending date). Returned only in :meth:`telegram.Bot.get_chat`.
        permissions (:class:`telegram.ChatPermissions`): Optional. Default chat member permissions,
            for groups and supergroups. Returned only in :meth:`telegram.Bot.get_chat`.
        slow_mode_delay (:obj:`int`): Optional. For supergroups, the minimum allowed delay between
            consecutive messages sent by each unprivileged user. Returned only in
            :meth:`telegram.Bot.get_chat`.
        message_auto_delete_time (:obj:`int`): Optional. The time after which all messages sent to
            the chat will be automatically deleted; in seconds. Returned only in
            :meth:`telegram.Bot.get_chat`.

            .. versionadded:: 13.4
        has_protected_content (:obj:`bool`): Optional. :obj:`True`, if messages from the chat can't
            be forwarded to other chats.

            .. versionadded:: 13.9
        sticker_set_name (:obj:`str`): Optional. For supergroups, name of Group sticker set.
        can_set_sticker_set (:obj:`bool`): Optional. :obj:`True`, if the bot can change group the
            sticker set.
        linked_chat_id (:obj:`int`): Optional. Unique identifier for the linked chat, i.e. the
            discussion group identifier for a channel and vice versa; for supergroups and channel
            chats. Returned only in :meth:`telegram.Bot.get_chat`.
        location (:class:`telegram.ChatLocation`): Optional. For supergroups, the location to which
            the supergroup is connected. Returned only in :meth:`telegram.Bot.get_chat`.
        join_to_send_messages (:obj:`bool`): Optional. :obj:`True`, if users need to join the
            supergroup before they can send messages. Returned only in
            :meth:`telegram.Bot.get_chat`.

            .. versionadded:: 13.13
        join_by_request (:obj:`bool`): Optional. :obj:`True`, if all users directly joining the
            supergroup need to be approved by supergroup administrators. Returned only in
            :meth:`telegram.Bot.get_chat`.

            .. versionadded:: 13.13
        has_restricted_voice_and_video_messages (:obj:`bool`): Optional. :obj:`True`, if the
            privacy settings of the other party restrict sending voice and video note messages
            in the private chat. Returned only in :meth:`telegram.Bot.get_chat`.

            .. versionadded:: 13.14
    )bioidtype	last_namebotsticker_set_nameslow_mode_delaylocation
first_namepermissionsinvite_linkpinned_messagedescriptioncan_set_sticker_setusernametitlephotolinked_chat_idall_members_are_administratorsmessage_auto_delete_timehas_protected_contenthas_private_forwardsjoin_to_send_messagesjoin_by_request'has_restricted_voice_and_video_messages	_id_attrsSENDERPRIVATEGROUP
SUPERGROUPCHANNELNr   r   )r2   r3   r@   r?   r9   r4   r5   rA   r=   r;   r<   r:   r6   r>   r7   r1   rB   r8   rD   rF   rE   rG   rH   rI   _kwargsc                 K   s   t || _|| _|| _|| _|| _|| _|d| _|| _	|| _
|| _|	| _|
| _|| _|| _|| _|d k	rtt |nd | _|| _|| _|| _|| _|| _|| _|| _|| _|| _| jf| _d S )NrC   )intr2   r3   r@   r?   r9   r4   getrC   rA   r1   rF   r=   r;   r<   r:   r7   rD   rE   r6   r>   rB   r8   rG   rH   rI   r5   rJ   )selfr2   r3   r@   r?   r9   r4   r5   rA   r=   r;   r<   r:   r6   r>   r7   r1   rB   r8   rD   rF   rE   rG   rH   rI   rP    rT   1/tmp/pip-unpacked-wheel-2u9rcp5s/telegram/chat.py__init__   s6    
zChat.__init__)returnc                 C   s(   | j s
dS | jr"| j  d| j S | j S )aK  
        :obj:`str`: Convenience property. If :attr:`first_name` is not :obj:`None` gives,
        :attr:`first_name` followed by (if available) :attr:`last_name`.

        Note:
            :attr:`full_name` will always be :obj:`None`, if the chat is a (super)group or
            channel.

        .. versionadded:: 13.2
        N )r9   r4   rS   rT   rT   rU   	full_name+  s
    zChat.full_namec                 C   s   | j rd| j  S dS )zw:obj:`str`: Convenience property. If the chat has a :attr:`username`, returns a t.me
        link of the chat.
        zhttps://t.me/N)r?   rY   rT   rT   rU   link=  s    z	Chat.link)datar5   rW   c                 C   s   |  |}|sdS t|d||d< ddlm} ||d||d< t|d||d< t|d||d< | f d|i|S )	z,See :meth:`telegram.TelegramObject.de_json`.NrA   r   )r   r<   r:   r8   r5   )Z_parse_datar
   de_jsonrR   telegramr   r   r   )clsr\   r5   r   rT   rT   rU   r]   F  s    
zChat.de_json)timeout
api_kwargsrW   c                 C   s   | j j| j||dS )a  Shortcut for::

            bot.leave_chat(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Bot.leave_chat`.

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.

        chat_idr`   ra   )r5   Z
leave_chatr2   rS   r`   ra   rT   rT   rU   leaveW  s
    z
Chat.leaver   c                 C   s   | j j| j||dS )aT  Shortcut for::

            bot.get_chat_administrators(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.get_chat_administrators`.

        Returns:
            List[:class:`telegram.ChatMember`]: A list of administrators in a chat. An Array of
            :class:`telegram.ChatMember` objects that contains information about all
            chat administrators except other bots. If the chat is a group or a supergroup
            and no administrators were appointed, only the creator will be returned.

        rb   )r5   Zget_chat_administratorsr2   rd   rT   rT   rU   get_administratorsh  s
    zChat.get_administratorsc                 C   s   t jdtdd | j||dS )zp
        Deprecated, use :func:`~telegram.Chat.get_member_count` instead.

        .. deprecated:: 13.7
        zL`Chat.get_members_count` is deprecated. Use `Chat.get_member_count` instead.   
stacklevel)r`   ra   )warningswarnr   get_member_countrd   rT   rT   rU   get_members_count  s    zChat.get_members_countc                 C   s   | j j| j||dS )a  Shortcut for::

            bot.get_chat_member_count(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.get_chat_member_count`.

        Returns:
            :obj:`int`
        rb   )r5   Zget_chat_member_countr2   rd   rT   rT   rU   rl     s
    zChat.get_member_count)user_idr`   ra   rW   c                 C   s   | j j| j|||dS )a  Shortcut for::

            bot.get_chat_member(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Bot.get_chat_member`.

        Returns:
            :class:`telegram.ChatMember`

        rc   rn   r`   ra   )r5   Zget_chat_memberr2   rS   rn   r`   ra   rT   rT   rU   
get_member  s    zChat.get_member)rn   r`   
until_datera   revoke_messagesrW   c                 C   s$   t jdtdd | j|||||dS )zj
        Deprecated, use :func:`~telegram.Chat.ban_member` instead.

        .. deprecated:: 13.7
        z@`Chat.kick_member` is deprecated. Use `Chat.ban_member` instead.rg   rh   )rn   r`   rr   ra   rs   )rj   rk   r   
ban_memberrS   rn   r`   rr   ra   rs   rT   rT   rU   kick_member  s    zChat.kick_memberc                 C   s   | j j| j|||||dS )a  Shortcut for::

            bot.ban_chat_member(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.ban_chat_member`.

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.
        )rc   rn   r`   rr   ra   rs   )r5   Zban_chat_memberr2   ru   rT   rT   rU   rt     s    zChat.ban_member)sender_chat_idr`   ra   rW   c                 C   s   | j j| j|||dS )aP  Shortcut for::

            bot.ban_chat_sender_chat(chat_id=update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.ban_chat_sender_chat`.

        .. versionadded:: 13.9

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.

        rc   rw   r`   ra   r5   Zban_chat_sender_chatr2   rS   rw   r`   ra   rT   rT   rU   ban_sender_chat  s       zChat.ban_sender_chat)rc   r`   ra   rW   c                 C   s   | j j|| j||dS )aW  Shortcut for::

            bot.ban_chat_sender_chat(sender_chat_id=update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.ban_chat_sender_chat`.

        .. versionadded:: 13.9

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.

        rx   ry   rS   rc   r`   ra   rT   rT   rU   ban_chat	  s       zChat.ban_chatc                 C   s   | j j| j|||dS )aT  Shortcut for::

            bot.unban_chat_sender_chat(chat_id=update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.unban_chat_sender_chat`.

        .. versionadded:: 13.9

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.

        rx   r5   Zunban_chat_sender_chatr2   rz   rT   rT   rU   unban_sender_chat   s       zChat.unban_sender_chatc                 C   s   | j j|| j||dS )a[  Shortcut for::

            bot.unban_chat_sender_chat(sender_chat_id=update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.unban_chat_sender_chat`.

        .. versionadded:: 13.9

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.

        rx   r~   r|   rT   rT   rU   
unban_chat7  s       zChat.unban_chat)rn   r`   ra   only_if_bannedrW   c                 C   s   | j j| j||||dS )a  Shortcut for::

            bot.unban_chat_member(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Bot.unban_chat_member`.

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.

        )rc   rn   r`   ra   r   )r5   Zunban_chat_memberr2   )rS   rn   r`   ra   r   rT   rT   rU   unban_memberN  s    zChat.unban_member)rn   can_change_infocan_post_messagescan_edit_messagescan_delete_messagescan_invite_userscan_restrict_memberscan_pin_messagescan_promote_membersr`   ra   is_anonymouscan_manage_chatcan_manage_voice_chatscan_manage_video_chatsrW   c                 C   s.   | j j| j|||||||||	|
|||||dS )a  Shortcut for::

            bot.promote_chat_member(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.promote_chat_member`.

        .. versionadded:: 13.2

        ..versionchanged:: 13.12
            Since Bot API 6.0, voice chat was renamed to video chat.

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.

        )rc   rn   r   r   r   r   r   r   r   r   r`   ra   r   r   r   r   )r5   Zpromote_chat_memberr2   )rS   rn   r   r   r   r   r   r   r   r   r`   ra   r   r   r   r   rT   rT   rU   promote_memberg  s$    "zChat.promote_member)rn   r:   rr   r`   ra   rW   c                 C   s   | j j| j|||||dS )aH  Shortcut for::

            bot.restrict_chat_member(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.restrict_chat_member`.

        .. versionadded:: 13.2

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.

        )rc   rn   r:   rr   r`   ra   )r5   Zrestrict_chat_memberr2   )rS   rn   r:   rr   r`   ra   rT   rT   rU   restrict_member  s    zChat.restrict_member)r:   r`   ra   rW   c                 C   s   | j j| j|||dS )a(  Shortcut for::

            bot.set_chat_permissions(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.set_chat_permissions`.

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.

        )rc   r:   r`   ra   )r5   Zset_chat_permissionsr2   )rS   r:   r`   ra   rT   rT   rU   set_permissions  s    zChat.set_permissions)rn   custom_titler`   ra   rW   c                 C   s   | j j| j||||dS )aF  Shortcut for::

            bot.set_chat_administrator_custom_title(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.set_chat_administrator_custom_title`.

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.

        )rc   rn   r   r`   ra   )r5   Z#set_chat_administrator_custom_titler2   )rS   rn   r   r`   ra   rT   rT   rU   set_administrator_custom_title  s    z#Chat.set_administrator_custom_title)
message_iddisable_notificationr`   ra   rW   c                 C   s   | j j| j||||dS )am  Shortcut for::

             bot.pin_chat_message(chat_id=update.effective_chat.id,
                                  *args,
                                  **kwargs)

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.pin_chat_message`.

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.

        )rc   r   r   r`   ra   )r5   Zpin_chat_messager2   )rS   r   r   r`   ra   rT   rT   rU   pin_message  s    zChat.pin_message)r`   ra   r   rW   c                 C   s   | j j| j|||dS )au  Shortcut for::

             bot.unpin_chat_message(chat_id=update.effective_chat.id,
                                    *args,
                                    **kwargs)

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.unpin_chat_message`.

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.

        )rc   r`   ra   r   )r5   Zunpin_chat_messager2   )rS   r`   ra   r   rT   rT   rU   unpin_message  s    zChat.unpin_messagec                 C   s   | j j| j||dS )a  Shortcut for::

             bot.unpin_all_chat_messages(chat_id=update.effective_chat.id,
                                         *args,
                                         **kwargs)

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.unpin_all_chat_messages`.

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.

        rb   )r5   Zunpin_all_chat_messagesr2   rd   rT   rT   rU   unpin_all_messages"  s
    zChat.unpin_all_messagesr   r"   )r"   .)text
parse_modedisable_web_page_previewr   reply_to_message_idreply_markupr`   ra   allow_sending_without_replyentitiesprotect_contentrW   c                 C   s&   | j j| j|||||||||	|
|dS )a/  Shortcut for::

            bot.send_message(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Bot.send_message`.

        Returns:
            :class:`telegram.Message`: On success, instance representing the message posted.

        )rc   r   r   r   r   r   r   r`   ra   r   r   r   )r5   send_messager2   )rS   r   r   r   r   r   r   r`   ra   r   r   r   rT   rT   rU   r   :  s    zChat.send_message)r#   r$   r%   r&   )mediar   r   r`   ra   r   r   rW   c              
   C   s   | j j| j|||||||dS )a=  Shortcut for::

            bot.send_media_group(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Bot.send_media_group`.

        Returns:
            List[:class:`telegram.Message`]: On success, instance representing the message posted.

        )rc   r   r   r   r`   ra   r   r   )r5   send_media_groupr2   )rS   r   r   r   r`   ra   r   r   rT   rT   rU   r   a  s    zChat.send_media_group)actionr`   ra   rW   c                 C   s   | j j| j|||dS )a  Shortcut for::

            bot.send_chat_action(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Bot.send_chat_action`.

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.

        )rc   r   r`   ra   )r5   send_chat_actionr2   )rS   r   r`   ra   rT   rT   rU   r     s    zChat.send_chat_actionr'   )rA   captionr   r   r   r`   r   ra   r   caption_entitiesfilenamer   rW   c                 C   s(   | j j| j|||||||||	|
||dS )a+  Shortcut for::

            bot.send_photo(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Bot.send_photo`.

        Returns:
            :class:`telegram.Message`: On success, instance representing the message posted.

        )rc   rA   r   r   r   r   r`   r   ra   r   r   r   r   )r5   
send_photor2   )rS   rA   r   r   r   r   r`   r   ra   r   r   r   r   rT   rT   rU   r     s    zChat.send_photor   )phone_numberr9   r4   r   r   r   r`   contactvcardra   r   r   rW   c                 C   s(   | j j| j|||||||||	|
||dS )a/  Shortcut for::

            bot.send_contact(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Bot.send_contact`.

        Returns:
            :class:`telegram.Message`: On success, instance representing the message posted.

        )rc   r   r9   r4   r   r   r   r`   r   r   ra   r   r   )r5   send_contactr2   )rS   r   r9   r4   r   r   r   r`   r   r   ra   r   r   rT   rT   rU   r     s    zChat.send_contactr(   )audioduration	performerr@   r   r   r   r   r`   r   thumbra   r   r   r   r   rW   c                 C   s0   | j j| j|||||||||	|
||||||dS )a+  Shortcut for::

            bot.send_audio(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Bot.send_audio`.

        Returns:
            :class:`telegram.Message`: On success, instance representing the message posted.

        )rc   r   r   r   r@   r   r   r   r   r`   r   r   ra   r   r   r   r   )r5   
send_audior2   )rS   r   r   r   r@   r   r   r   r   r`   r   r   ra   r   r   r   r   rT   rT   rU   r     s&    zChat.send_audior)   )documentr   r   r   r   r   r`   r   r   ra   disable_content_type_detectionr   r   r   rW   c                 C   s,   | j j| j|||||||||	|
||||dS )a1  Shortcut for::

            bot.send_document(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Bot.send_document`.

        Returns:
            :class:`telegram.Message`: On success, instance representing the message posted.

        )rc   r   r   r   r   r   r   r`   r   r   ra   r   r   r   r   )r5   send_documentr2   )rS   r   r   r   r   r   r   r`   r   r   ra   r   r   r   r   rT   rT   rU   r     s"    zChat.send_document)	r   r   r   r`   emojira   r   r   rW   c	           	      C   s    | j j| j||||||||d	S )a)  Shortcut for::

            bot.send_dice(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Bot.send_dice`.

        Returns:
            :class:`telegram.Message`: On success, instance representing the message posted.

        )	rc   r   r   r   r`   r   ra   r   r   )r5   	send_dicer2   )	rS   r   r   r   r`   r   ra   r   r   rT   rT   rU   r   L  s    zChat.send_dicer   )	game_short_namer   r   r   r`   ra   r   r   rW   c	           	      C   s    | j j| j||||||||d	S )a)  Shortcut for::

            bot.send_game(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Bot.send_game`.

        Returns:
            :class:`telegram.Message`: On success, instance representing the message posted.

        )	rc   r   r   r   r   r`   ra   r   r   )r5   	send_gamer2   )	rS   r   r   r   r   r`   ra   r   r   rT   rT   rU   r   m  s    zChat.send_gamer+   )r@   r=   payloadprovider_tokencurrencypricesstart_parameter	photo_url
photo_sizephoto_widthphoto_height	need_nameneed_phone_number
need_emailneed_shipping_addressis_flexibler   r   r   provider_datasend_phone_number_to_providersend_email_to_providerr`   ra   r   max_tip_amountsuggested_tip_amountsr   rW   c                 C   sH   | j j| j|||||||||	|
||||||||||||||||||dS )a  Shortcut for::

            bot.send_invoice(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Bot.send_invoice`.

        Warning:
            As of API 5.2 :attr:`start_parameter` is an optional argument and therefore the order
            of the arguments had to be changed. Use keyword arguments to make sure that the
            arguments are passed correctly.

        .. versionchanged:: 13.5
            As of Bot API 5.2, the parameter :attr:`start_parameter` is optional.

        Returns:
            :class:`telegram.Message`: On success, instance representing the message posted.

        )rc   r@   r=   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r`   ra   r   r   r   r   )r5   send_invoicer2   )rS   r@   r=   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r`   ra   r   r   r   r   rT   rT   rU   r     s>    1zChat.send_invoicer    )latitude	longituder   r   r   r`   r8   live_periodra   horizontal_accuracyheadingproximity_alert_radiusr   r   rW   c                 C   s,   | j j| j|||||||||	|
||||dS )a1  Shortcut for::

            bot.send_location(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Bot.send_location`.

        Returns:
            :class:`telegram.Message`: On success, instance representing the message posted.

        )rc   r   r   r   r   r   r`   r8   r   ra   r   r   r   r   r   )r5   send_locationr2   )rS   r   r   r   r   r   r`   r8   r   ra   r   r   r   r   r   rT   rT   rU   r     s"    zChat.send_locationr*   )	animationr   widthheightr   r   r   r   r   r   r`   ra   r   r   r   r   rW   c                 C   s0   | j j| j|||||||||	|
||||||dS )a3  Shortcut for::

            bot.send_animation(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Bot.send_animation`.

        Returns:
            :class:`telegram.Message`: On success, instance representing the message posted.

        )rc   r   r   r   r   r   r   r   r   r   r   r`   ra   r   r   r   r   )r5   send_animationr2   )rS   r   r   r   r   r   r   r   r   r   r   r`   ra   r   r   r   r   rT   rT   rU   r     s&    zChat.send_animationr,   )	stickerr   r   r   r`   ra   r   r   rW   c	           	      C   s    | j j| j||||||||d	S )a/  Shortcut for::

            bot.send_sticker(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Bot.send_sticker`.

        Returns:
            :class:`telegram.Message`: On success, instance representing the message posted.

        )	rc   r   r   r   r   r`   ra   r   r   )r5   send_stickerr2   )	rS   r   r   r   r   r`   ra   r   r   rT   rT   rU   r   =  s    zChat.send_stickerr!   )r   r   r@   addressfoursquare_idr   r   r   r`   venuefoursquare_typera   google_place_idgoogle_place_typer   r   rW   c                 C   s0   | j j| j|||||||||	|
||||||dS )a+  Shortcut for::

            bot.send_venue(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Bot.send_venue`.

        Returns:
            :class:`telegram.Message`: On success, instance representing the message posted.

        )rc   r   r   r@   r   r   r   r   r   r`   r   r   ra   r   r   r   r   )r5   
send_venuer2   )rS   r   r   r@   r   r   r   r   r   r`   r   r   ra   r   r   r   r   rT   rT   rU   r   ^  s&    zChat.send_venuer-   )videor   r   r   r   r   r`   r   r   r   supports_streamingr   ra   r   r   r   r   rW   c                 C   s2   | j j| j|||||||||	|
|||||||dS )a+  Shortcut for::

            bot.send_video(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Bot.send_video`.

        Returns:
            :class:`telegram.Message`: On success, instance representing the message posted.

        )rc   r   r   r   r   r   r   r`   r   r   r   r   r   ra   r   r   r   r   )r5   
send_videor2   )rS   r   r   r   r   r   r   r`   r   r   r   r   r   ra   r   r   r   r   rT   rT   rU   r     s(    zChat.send_videor.   )
video_noter   lengthr   r   r   r`   r   ra   r   r   r   rW   c                 C   s(   | j j| j|||||||||	|
||dS )a5  Shortcut for::

            bot.send_video_note(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Bot.send_video_note`.

        Returns:
            :class:`telegram.Message`: On success, instance representing the message posted.

        )rc   r   r   r   r   r   r   r`   r   ra   r   r   r   )r5   send_video_noter2   )rS   r   r   r   r   r   r   r`   r   ra   r   r   r   rT   rT   rU   r     s    zChat.send_video_noter/   )voicer   r   r   r   r   r`   r   ra   r   r   r   r   rW   c                 C   s*   | j j| j|||||||||	|
|||dS )a+  Shortcut for::

            bot.send_voice(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Bot.send_voice`.

        Returns:
            :class:`telegram.Message`: On success, instance representing the message posted.

        )rc   r   r   r   r   r   r   r`   r   ra   r   r   r   r   )r5   
send_voicer2   )rS   r   r   r   r   r   r   r`   r   ra   r   r   r   r   rT   rT   rU   r     s     zChat.send_voiceTF)questionoptionsr   r3   allows_multiple_answerscorrect_option_id	is_closedr   r   r   r`   explanationexplanation_parse_modeopen_period
close_datera   r   explanation_entitiesr   rW   c                 C   s6   | j j| j|||||||||	|
|||||||||dS )a)  Shortcut for::

            bot.send_poll(update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Bot.send_poll`.

        Returns:
            :class:`telegram.Message`: On success, instance representing the message posted.

        )rc   r   r   r   r3   r   r   r   r   r   r   r`   r   r   r   r   ra   r   r   r   )r5   	send_pollr2   )rS   r   r   r   r3   r   r   r   r   r   r   r`   r   r   r   r   ra   r   r   r   rT   rT   rU   r     s,    !zChat.send_pollr   )from_chat_idr   r   r   r   r   r   r   r   r`   ra   r   rW   c                 C   s(   | j j| j|||||||||	|
||dS )a7  Shortcut for::

            bot.copy_message(chat_id=update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Bot.copy_message`.

        Returns:
            :class:`telegram.Message`: On success, instance representing the message posted.

        )rc   r   r   r   r   r   r   r   r   r   r`   ra   r   r5   copy_messager2   )rS   r   r   r   r   r   r   r   r   r   r`   ra   r   rT   rT   rU   	send_copyN  s    zChat.send_copy)rc   r   r   r   r   r   r   r   r   r`   ra   r   rW   c                 C   s(   | j j| j|||||||||	|
||dS )a<  Shortcut for::

            bot.copy_message(from_chat_id=update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Bot.copy_message`.

        Returns:
            :class:`telegram.Message`: On success, instance representing the message posted.

        )r   rc   r   r   r   r   r   r   r   r   r`   ra   r   r   )rS   rc   r   r   r   r   r   r   r   r   r`   ra   r   rT   rT   rU   r   w  s    zChat.copy_messagec                 C   s   | j j| j||dS )aL  Shortcut for::

            bot.export_chat_invite_link(chat_id=update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.export_chat_invite_link`.

        .. versionadded:: 13.4

        Returns:
            :obj:`str`: New invite link on success.

        rb   )r5   Zexport_chat_invite_linkr2   rd   rT   rT   rU   export_invite_link  s
      zChat.export_invite_linkr   )expire_datemember_limitr`   ra   namecreates_join_requestrW   c              	   C   s   | j j| j||||||dS )a  Shortcut for::

            bot.create_chat_invite_link(chat_id=update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.create_chat_invite_link`.

        .. versionadded:: 13.4

        .. versionchanged:: 13.8
           Edited signature according to the changes of
           :meth:`telegram.Bot.create_chat_invite_link`.

        Returns:
            :class:`telegram.ChatInviteLink`

        )rc   r   r   r`   ra   r   r   )r5   Zcreate_chat_invite_linkr2   )rS   r   r   r`   ra   r   r   rT   rT   rU   create_invite_link  s    zChat.create_invite_link)r;   r   r   r`   ra   r   r   rW   c              
   C   s   | j j| j|||||||dS )a  Shortcut for::

            bot.edit_chat_invite_link(chat_id=update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.edit_chat_invite_link`.

        .. versionadded:: 13.4

        .. versionchanged:: 13.8
           Edited signature according to the changes of :meth:`telegram.Bot.edit_chat_invite_link`.

        Returns:
            :class:`telegram.ChatInviteLink`

        )rc   r;   r   r   r`   ra   r   r   )r5   Zedit_chat_invite_linkr2   )rS   r;   r   r   r`   ra   r   r   rT   rT   rU   edit_invite_link  s    zChat.edit_invite_link)r;   r`   ra   rW   c                 C   s   | j j| j|||dS )aE  Shortcut for::

            bot.revoke_chat_invite_link(chat_id=update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.revoke_chat_invite_link`.

        .. versionadded:: 13.4

        Returns:
            :class:`telegram.ChatInviteLink`

        )rc   r;   r`   ra   )r5   Zrevoke_chat_invite_linkr2   )rS   r;   r`   ra   rT   rT   rU   revoke_invite_link  s       zChat.revoke_invite_linkc                 C   s   | j j| j|||dS )aZ  Shortcut for::

            bot.approve_chat_join_request(chat_id=update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.approve_chat_join_request`.

        .. versionadded:: 13.8

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.

        ro   )r5   Zapprove_chat_join_requestr2   rp   rT   rT   rU   approve_join_request  s       zChat.approve_join_requestc                 C   s   | j j| j|||dS )aZ  Shortcut for::

            bot.decline_chat_join_request(chat_id=update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.decline_chat_join_request`.

        .. versionadded:: 13.8

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.

        ro   )r5   Zdecline_chat_join_requestr2   rp   rT   rT   rU   decline_join_request-  s       zChat.decline_join_request)menu_buttonr`   ra   rW   c                 C   s   | j j| j|||dS )a  Shortcut for::

             bot.set_chat_menu_button(chat_id=update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.set_chat_menu_button`.

        Caution:
            Can only work, if the chat is a private chat.

        ..seealso:: :meth:`get_menu_button`

        .. versionadded:: 13.12

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.
        )rc   r  r`   ra   )r5   Zset_chat_menu_buttonr2   )rS   r  r`   ra   rT   rT   rU   set_menu_buttonD  s    zChat.set_menu_buttonc                 C   s   | j j| j||dS )a  Shortcut for::

             bot.get_chat_menu_button(chat_id=update.effective_chat.id, *args, **kwargs)

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.set_chat_menu_button`.

        Caution:
            Can only work, if the chat is a private chat.

        ..seealso:: :meth:`set_menu_button`

        .. versionadded:: 13.12

        Returns:
            :class:`telegram.MenuButton`: On success, the current menu button is returned.
        rb   )r5   Zget_chat_menu_buttonr2   rd   rT   rT   rU   get_menu_buttonb  s
    zChat.get_menu_button)NNNNNNNNNNNNNNNNNNNNNN)^__name__
__module____qualname____doc__	__slots__r   ZCHAT_SENDERrK   r   str__annotations__ZCHAT_PRIVATErL   Z
CHAT_GROUPrM   ZCHAT_SUPERGROUPrN   ZCHAT_CHANNELrO   rQ   r
   r   boolr   r	   rV   propertyr   rZ   r[   classmethodr   r]   r   r   floatre   r   rf   rm   rl   r   rq   r   rv   rt   r{   r}   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Zsend_actionr   r   r   r   r   r   r   objectr   r   r   r   r   r   r   r   ZPOLL_REGULARr   r   r   r   r   r   r   r  r  r   r  r  rT   rT   rT   rU   r0   >   s  
                       =      








9

!
,$
+,
4
/$)
S0
4
#4
6
,
/
<
-
+
'
( r0   )7r	  rj   r   typingr   r   r   r   r   r   r	   r^   r
   r   r   r   Ztelegram.utils.typesr   r   r   r   Ztelegram.utils.deprecater   Zchatpermissionsr   Zchatlocationr   Zutils.helpersr   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   rT   rT   rT   rU   <module>   s   $h