U
    gJ                    @   s  d Z ddlmZ ddlmZ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 ddlmZmZmZmZmZ dd	lmZ dd
l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-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4 G dd deZ5dS )z?This module contains an object that represents a Telegram User.    )datetime)TYPE_CHECKINGOptionalSequenceTupleUnion)InlineKeyboardButton)
MenuButton)TelegramObject)DEFAULT_NONE)CorrectOptionID	FileInputJSONDictODVInputReplyMarkup)mention_html)mention_markdown)	AnimationAudioContactDocumentInlineKeyboardMarkupInputMediaAudioInputMediaDocumentInputMediaPhotoInputMediaVideoInputPollOptionLabeledPriceLinkPreviewOptionsLocationMessageMessageEntity	MessageId	PhotoSizeReplyParametersStickerUserChatBoostsUserProfilePhotosVenueVideo	VideoNoteVoicec                &       s  e Zd ZdZdZdddeeeee ee ee ee ee ee ee ee ee ee ee	 d fddZ
eedd	d
ZeedddZeee dddZdeeeeddee ee ee ee ee ee ee	 ed dddZdee edddZdee edddZdee edddZdee edddZedfeeeeddeee ee ee ee ee ee ee	 ed	ddZdeeeeddee ee ee ee ee ee ee	 ed d!d"Zeeeeddee ee ee ee ee	 ed#d$d%Zeeddededddf
ddeeeeedd&eee ee ee eed'  ee ee ed( ed) ee ee ee ee ee ee ee ee ee ee	 d*d+d,d-Zeeeeddeee ee ee ee ee	 ed.d/d0Zeeeeddee ee ee ee ee ee	 ed1d2d3Zdedededdddddfdedeeeedd4e e!d5f ee ee ee ee eed'  ee ee ee ed) ee ee ee ee ee ee ee ee ee ee ee	 d*d6d7d8Z"eeddddfdeeeeeddedd9
ee d:  ee ee ee ed) ee ee ee ee ee ee ee ee ee	 ee ee eed'  e#d; d<d=d>Z$ddddedededddddfdedeeeedd4e e!d?f ee ee ee ee ee ee ee eed'  ee ee ee! ed) ee ee ee ee ee ee ee ee ee ee	 d*d@dAdBZ%deeeeddeee ee ee ee ee ee ee	 edC	dDdEZ&e&Z'dddeddeddddfdedeeeeddFee ee ee ee ee ee ee ee ed) ee ee ee ee edG ee ee ee ee ee	 d*dHdIdJZ(eddeddddfdeeeeeddKee ee ee ee ee ed) ee ee ee ee ee ee ee ee ee	 d*dLdMdNZ)dededdedddddfdedeeeedd4e e!dOf ee ee ee ee ee eed'  ee ee ee! ed) ee ee ee ee ee ee ee ee ee ee	 d*dPdQdRZ*ededdddfdeeeeeddKeee edS ee ee ed) ee ee ee ee ee ee ee ee ee	 d*dTdUdVZ+ddddddddddeddddddedddfdeeeeeddKeeeee eedW ee ee ee ee ee ee ee ee ee ee ee edS ee ee,f  ee ee ee eee  ee ee ed) ee ee ee ee ee ee ee ee	 d*dX#dYdZZ-ddedddddeddddfdedeeeedd[ee ee ee ee ee ee ee ee ee ee ed) ee ee ee ee ed\ ee ee ee ee ee	 d*d]d^d_Z.ddddeeddedddddddfdedeeeedd4e e!d`f ee ee ee ee ee ee ee eed'  ee ee ee ee! ed) ee ee ee ee ee ee ee ee ee ee ee	 d*dadbdcZ/ededddddfdeeeeeddKe e!ddf ee ee ee ee ee ed) ee ee ee ee ee ee ee ee ee	 d*dedfdgZ0ddedddeddedddddddfdedeeeedd4e e!dhf ee ee ee ee ee ee ee ee eed'  ee ee ee ee! ed) ee ee ee ee ee ee ee ee ee ee ee	 d*didjdkZ1dddddeddddeddddfdedeeeeddlee ee ee ee ee ee ee ee ee ee ee ee ed) ee ee ee ee edm ee ee ee ee ee	 d*dndodpZ2ddededddddf
dedeeeedd4e e!dqf ee ee ee ee ee ee ee! ed) ee ee ee ee ee ee ee ee ee ee	 d*drdsdtZ3ddedededdddfdedeeeedd4e e!duf ee ee ee ee ee eed'  ee ee ed) ee ee ee ee ee ee ee ee ee ee	 d*dvdwdxZ4dddddeddedddedddeddfdeeeeeddKeee edyf  ee ee ee ee5 ee ee ee ee ee ee ee ee6f  eed'  ee ee ed) ee ee eed'  ee ee ee ee ee ee ee ee	 d*dzd{d|Z7dedededddf	deeeeeddKe eef eee ee eed'  ee ee ee ee ed) ee ee ee ee ee ee ee ee	 d}d~ddZ8dedededddf	deeeeeddKe eef eee ee eed'  ee ee ee ee ed) ee ee ee ee ee ee ee ee	 d}dddZ9eeddfeeeedde eef ee ee ee ee ee ee ee ee ee ee	 e#d dddZ:eeddfeeeedde eef ee ee ee ee ee ee ee ee ee ee	 e#d dddZ;eedfeeeedde eef eee ee ee ee ee ee ee ee	 d*dddZ<eedfeeeedde eef eee ee ee ee ee ee ee ee	 d*dddZ=eedfeeeedde eef ee ee ee ee ee ee ee ee ee	 e#d dddZ>eedfeeeedde eef ee ee ee ee ee ee ee ee ee	 e#d dddZ?eeeedde eef ee ee ee ee ee	 edddZ@eeeedde eef ee ee ee ee ee	 edddZAdeeeeddeeB ee ee ee ee ee	 edddZCeeeeddee ee ee ee ee	 eBd#ddZDeeeedde eef ee ee ee ee ee	 ddddZEeeeeddeee ee ee ee ee	 edddZF  ZGS )Userae  This object represents a Telegram user or bot.

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

    .. versionchanged:: 20.0
        The following are now keyword-only arguments in Bot methods:
        ``location``, ``filename``, ``venue``, ``contact``,
        ``{read, write, connect, pool}_timeout`` ``api_kwargs``. Use a named argument for those,
        and notice that some positional arguments changed position as a result.

    Args:
        id (:obj:`int`): Unique identifier for this user or bot.
        is_bot (:obj:`bool`): :obj:`True`, if this user is a bot.
        first_name (:obj:`str`): User's or bot's first name.
        last_name (:obj:`str`, optional): User's or bot's last name.
        username (:obj:`str`, optional): User's or bot's username.
        language_code (:obj:`str`, optional): IETF language tag of the user's language.
        can_join_groups (:obj:`str`, optional): :obj:`True`, if the bot can be invited to groups.
            Returned only in :meth:`telegram.Bot.get_me`.
        can_read_all_group_messages (:obj:`str`, optional): :obj:`True`, if privacy mode is
            disabled for the bot. Returned only in :meth:`telegram.Bot.get_me`.
        supports_inline_queries (:obj:`str`, optional): :obj:`True`, if the bot supports inline
            queries. Returned only in :meth:`telegram.Bot.get_me`.

        is_premium (:obj:`bool`, optional): :obj:`True`, if this user is a Telegram Premium user.

            .. versionadded:: 20.0
        added_to_attachment_menu (:obj:`bool`, optional): :obj:`True`, if this user added
            the bot to the attachment menu.

            .. versionadded:: 20.0
        can_connect_to_business (:obj:`bool`, optional): :obj:`True`,  if the bot can be connected
            to a Telegram Business account to receive its messages. Returned only in
            :meth:`telegram.Bot.get_me`.

            .. versionadded:: 21.1
        has_main_web_app (:obj:`bool`, optional): :obj:`True`, if the bot has the main Web App.
            Returned only in :meth:`telegram.Bot.get_me`.

            .. versionadded:: 21.5

    Attributes:
        id (:obj:`int`): Unique identifier for this user or bot.
        is_bot (:obj:`bool`): :obj:`True`, if this user is a bot.
        first_name (:obj:`str`): User's or bot's first name.
        last_name (:obj:`str`): Optional. User's or bot's last name.
        username (:obj:`str`): Optional. User's or bot's username.
        language_code (:obj:`str`): Optional. IETF language tag of the user's language.
        can_join_groups (:obj:`str`): Optional. :obj:`True`, if the bot can be invited to groups.
            Returned only in :attr:`telegram.Bot.get_me` requests.
        can_read_all_group_messages (:obj:`str`): Optional. :obj:`True`, if privacy mode is
            disabled for the bot. Returned only in :attr:`telegram.Bot.get_me` requests.
        supports_inline_queries (:obj:`str`): Optional. :obj:`True`, if the bot supports inline
            queries. Returned only in :attr:`telegram.Bot.get_me` requests.
        is_premium (:obj:`bool`): Optional. :obj:`True`, if this user is a Telegram
            Premium user.

            .. versionadded:: 20.0
        added_to_attachment_menu (:obj:`bool`): Optional. :obj:`True`, if this user added
            the bot to the attachment menu.

            .. versionadded:: 20.0
        can_connect_to_business (:obj:`bool`): Optional. :obj:`True`,  if the bot can be connected
            to a Telegram Business account to receive its messages. Returned only in
            :meth:`telegram.Bot.get_me`.

            .. versionadded:: 21.1
        has_main_web_app (:obj:`bool`) Optional. :obj:`True`, if the bot has the main Web App.
            Returned only in :meth:`telegram.Bot.get_me`.

            .. versionadded:: 21.5

    .. |user_chat_id_note| replace:: This shortcuts build on the assumption that :attr:`User.id`
        coincides with the :attr:`Chat.id` of the private chat with the user. This has been the
        case so far, but Telegram does not guarantee that this stays this way.
    )added_to_attachment_menucan_connect_to_businesscan_join_groupscan_read_all_group_messages
first_namehas_main_web_appidis_bot
is_premiumlanguage_code	last_namesupports_inline_queriesusernameN
api_kwargs)r3   r1   r4   r7   r9   r6   r/   r0   r8   r5   r-   r.   r2   r;   c                   sr   t  j|d || _|| _|| _|| _|| _|| _|| _|| _	|	| _
|
| _|| _|| _|| _| jf| _|   d S )Nr:   )super__init__r3   r1   r4   r7   r9   r6   r/   r0   r8   r5   r-   r.   r2   Z	_id_attrsZ_freeze)selfr3   r1   r4   r7   r9   r6   r/   r0   r8   r5   r-   r.   r2   r;   	__class__ 2/tmp/pip-unpacked-wheel-swnnwir2/telegram/_user.pyr=      s     
zUser.__init__)returnc                 C   s   | j rd| j  S | jS )z:obj:`str`: Convenience property. If available, returns the user's :attr:`username`
        prefixed with "@". If :attr:`username` is not available, returns :attr:`full_name`.
        @)r9   	full_namer>   rA   rA   rB   name   s    z	User.namec                 C   s   | j r| j d| j  S | jS )z:obj:`str`: Convenience property. The user's :attr:`first_name`, followed by (if
        available) :attr:`last_name`.
         )r7   r1   rF   rA   rA   rB   rE      s    zUser.full_namec                 C   s   | j rd| j  S dS )zu:obj:`str`: Convenience property. If :attr:`username` is available, returns a t.me link
        of the user.
        zhttps://t.me/N)r9   rF   rA   rA   rB   link   s    z	User.link)read_timeoutwrite_timeoutconnect_timeoutpool_timeoutr;   r'   )offsetlimitrJ   rK   rL   rM   r;   rC   c             
      s&   |   j| j|||||||dI dH S )zShortcut for::

             await bot.get_user_profile_photos(update.effective_user.id, *args, **kwargs)

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

        )user_idrN   rO   rJ   rK   rL   rM   r;   N)get_botZget_user_profile_photosr3   )r>   rN   rO   rJ   rK   rL   rM   r;   rA   rA   rB   get_profile_photos   s    zUser.get_profile_photos)rG   rC   c                 C   s   |rt | j|S t | j| jS )a  
        Note:
            :tg-const:`telegram.constants.ParseMode.MARKDOWN` is a legacy mode, retained by
            Telegram for backward compatibility. You should use :meth:`mention_markdown_v2`
            instead.

        Args:
            name (:obj:`str`): The name used as a link for the user. Defaults to :attr:`full_name`.

        Returns:
            :obj:`str`: The inline mention for the user as markdown (version 1).

        helpers_mention_markdownr3   rE   r>   rG   rA   rA   rB   r      s    zUser.mention_markdownc                 C   s&   |rt | j|ddS t | j| jddS )z
        Args:
            name (:obj:`str`): The name used as a link for the user. Defaults to :attr:`full_name`.

        Returns:
            :obj:`str`: The inline mention for the user as markdown (version 2).

           )versionrS   rU   rA   rA   rB   mention_markdown_v2  s    	zUser.mention_markdown_v2c                 C   s   |rt | j|S t | j| jS )z
        Args:
            name (:obj:`str`): The name used as a link for the user. Defaults to :attr:`full_name`.

        Returns:
            :obj:`str`: The inline mention for the user as HTML.

        )helpers_mention_htmlr3   rE   rU   rA   rA   rB   r     s    	zUser.mention_htmlc                 C   s   t |p
| jd| j dS )a{  Shortcut for::

            InlineKeyboardButton(text=name, url=f"tg://user?id={update.effective_user.id}")

        .. versionadded:: 13.9

        Args:
            name (:obj:`str`): The name used as a link for the user. Defaults to :attr:`full_name`.

        Returns:
            :class:`telegram.InlineKeyboardButton`: InlineButton with url set to the user mention
        ztg://user?id=)texturl)r   rE   r3   rU   rA   rA   rB   mention_button)  s    zUser.mention_button)	
message_iddisable_notificationbusiness_connection_idrJ   rK   rL   rM   r;   rC   c          	         s(   |   j| j||||||||d	I dH S )aW  Shortcut for::

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

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

        Note:
            |user_chat_id_note|

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

        )	chat_idr]   r^   rJ   rK   rL   rM   r_   r;   N)rQ   Zpin_chat_messager3   )	r>   r]   r^   r_   rJ   rK   rL   rM   r;   rA   rA   rB   pin_message8  s    zUser.pin_message)r]   r_   rJ   rK   rL   rM   r;   rC   c             
      s&   |   j| j|||||||dI dH S )a[  Shortcut for::

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

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

        Note:
            |user_chat_id_note|

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

        )r`   rJ   rK   rL   rM   r;   r]   r_   N)rQ   Zunpin_chat_messager3   )r>   r]   r_   rJ   rK   rL   rM   r;   rA   rA   rB   unpin_message]  s    zUser.unpin_message)rJ   rK   rL   rM   r;   rC   c                   s"   |   j| j|||||dI dH S )am  Shortcut for::

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

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

        Note:
            |user_chat_id_note|

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

        r`   rJ   rK   rL   rM   r;   N)rQ   Zunpin_all_chat_messagesr3   r>   rJ   rK   rL   rM   r;   rA   rA   rB   unpin_all_messages  s    zUser.unpin_all_messages)reply_to_message_iddisable_web_page_previewallow_sending_without_replyrJ   rK   rL   rM   r;   r!   r   r$   r    )rZ   
parse_moder^   reply_markupentitiesprotect_contentmessage_thread_idlink_preview_optionsreply_parametersr_   message_effect_idrf   rg   rh   rJ   rK   rL   rM   r;   rC   c                   s>   |   j| j|||||||	|||||||||||
|dI dH S )ae  Shortcut for::

             await bot.send_message(update.effective_user.id, *args, **kwargs)

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

        Note:
            |user_chat_id_note|

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

        )r`   rZ   ri   rg   rn   r^   rf   ro   rj   rh   rk   rl   rm   rJ   rK   rL   rM   r;   r_   rp   N)rQ   send_messager3   )r>   rZ   ri   r^   rj   rk   rl   rm   rn   ro   r_   rp   rf   rg   rh   rJ   rK   rL   rM   r;   rA   rA   rB   rq     s,    $zUser.send_message)r]   rJ   rK   rL   rM   r;   rC   c             	      s$   |   j| j||||||dI dH S )a<  Shortcut for::

             await bot.delete_message(update.effective_user.id, *argss, **kwargs)

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

        .. versionadded:: 20.8

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

        )r`   r]   rJ   rK   rL   rM   r;   N)rQ   delete_messager3   )r>   r]   rJ   rK   rL   rM   r;   rA   rA   rB   rr     s    zUser.delete_message)message_idsrJ   rK   rL   rM   r;   rC   c             	      s$   |   j| j||||||dI dH S )a>  Shortcut for::

             await bot.delete_messages(update.effective_user.id, *argss, **kwargs)

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

        .. versionadded:: 20.8

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

        )r`   rs   rJ   rK   rL   rM   r;   N)rQ   delete_messagesr3   )r>   rs   rJ   rK   rL   rM   r;   rA   rA   rB   rt     s    zUser.delete_messages)rf   rh   filenamerJ   rK   rL   rM   r;   r#   )photocaptionr^   rj   ri   caption_entitiesrl   rm   has_spoilerro   r_   rp   show_caption_above_mediarf   rh   ru   rJ   rK   rL   rM   r;   rC   c                   sB   |   j| j|||||
|||||||||||||	|||dI dH S )aa  Shortcut for::

             await bot.send_photo(update.effective_user.id, *args, **kwargs)

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

        Note:
            |user_chat_id_note|

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

        )r`   rv   rw   r^   rf   ro   rj   ri   rh   rx   ru   rl   rm   rJ   rK   rL   rM   r;   ry   r_   rp   rz   N)rQ   
send_photor3   )r>   rv   rw   r^   rj   ri   rx   rl   rm   ry   ro   r_   rp   rz   rf   rh   ru   rJ   rK   rL   rM   r;   rA   rA   rB   r{     s0    &zUser.send_photo)
rf   rh   rJ   rK   rL   rM   r;   rw   ri   rx   )r   r   r   r   )r    .)mediar^   rl   rm   ro   r_   rp   rf   rh   rJ   rK   rL   rM   r;   rw   ri   rx   rC   c       
            s:   |   j| j|||||
|||||	|||||||dI dH S )a  Shortcut for::

             await bot.send_media_group(update.effective_user.id, *args, **kwargs)

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

        Note:
            |user_chat_id_note|

        Returns:
            Tuple[:class:`telegram.Message`:] On success, a tuple of :class:`~telegram.Message`
            instances that were sent is returned.

        )r`   r|   r^   rf   ro   rJ   rK   rL   rM   r;   rh   rl   rm   rw   ri   rx   r_   rp   N)rQ   send_media_groupr3   )r>   r|   r^   rl   rm   ro   r_   rp   rf   rh   rJ   rK   rL   rM   r;   rw   ri   rx   rA   rA   rB   r}   Z  s(    %zUser.send_media_groupr   )audioduration	performertitlerw   r^   rj   ri   rx   rl   rm   	thumbnailro   r_   rp   rf   rh   ru   rJ   rK   rL   rM   r;   rC   c                   sF   |   j| j||||||||||||	||
|||||||||dI dH S )aa  Shortcut for::

             await bot.send_audio(update.effective_user.id, *args, **kwargs)

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

        Note:
            |user_chat_id_note|

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

        )r`   r~   r   r   r   rw   r^   rf   ro   rj   ri   rh   rx   ru   rl   rm   rJ   rK   rL   rM   r;   r   r_   rp   N)rQ   
send_audior3   )r>   r~   r   r   r   rw   r^   rj   ri   rx   rl   rm   r   ro   r_   rp   rf   rh   ru   rJ   rK   rL   rM   r;   rA   rA   rB   r     s4    (zUser.send_audio)	actionrm   r_   rJ   rK   rL   rM   r;   rC   c          	         s(   |   j| j||||||||d	I dH S )a5  Shortcut for::

             await bot.send_chat_action(update.effective_user.id, *args, **kwargs)

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

        Note:
            |user_chat_id_note|

        Returns:
            :obj:`True`: On success.

        )	r`   r   rm   rJ   rK   rL   rM   r;   r_   N)rQ   send_chat_actionr3   )	r>   r   rm   r_   rJ   rK   rL   rM   r;   rA   rA   rB   r     s    zUser.send_chat_action)rf   rh   contactrJ   rK   rL   rM   r;   r   )phone_numberr1   r7   r^   rj   vcardrl   rm   ro   r_   rp   rf   rh   r   rJ   rK   rL   rM   r;   rC   c                   s>   |   j| j||||||	||||||||||||
|dI dH S )ae  Shortcut for::

             await bot.send_contact(update.effective_user.id, *args, **kwargs)

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

        Note:
            |user_chat_id_note|

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

        )r`   r   r1   r7   r^   rf   ro   rj   rJ   rK   rL   rM   r   r   r;   rh   rl   rm   r_   rp   N)rQ   send_contactr3   )r>   r   r1   r7   r^   rj   r   rl   rm   ro   r_   rp   rf   rh   r   rJ   rK   rL   rM   r;   rA   rA   rB   r     s,    $zUser.send_contact)rf   rh   rJ   rK   rL   rM   r;   )r^   rj   emojirl   rm   ro   r_   rp   rf   rh   rJ   rK   rL   rM   r;   rC   c	                   s6   |   j| j||	|||||||||
||||dI dH S )a_  Shortcut for::

             await bot.send_dice(update.effective_user.id, *args, **kwargs)

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

        Note:
            |user_chat_id_note|

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

        )r`   r^   rf   ro   rj   rJ   rK   rL   rM   r   r;   rh   rl   rm   r_   rp   N)rQ   	send_dicer3   )r>   r^   rj   r   rl   rm   ro   r_   rp   rf   rh   rJ   rK   rL   rM   r;   rA   rA   rB   r   :  s$     zUser.send_dicer   )documentrw   r^   rj   ri   disable_content_type_detectionrx   rl   rm   r   ro   r_   rp   rf   rh   ru   rJ   rK   rL   rM   r;   rC   c                   sB   |   j| j|||||||||||||
||||||	||dI dH S )ag  Shortcut for::

             await bot.send_document(update.effective_user.id, *args, **kwargs)

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

        Note:
            |user_chat_id_note|

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

        )r`   r   ru   rw   r^   rf   ro   rj   rJ   rK   rL   rM   ri   r   r;   r   rh   rx   rl   rm   r_   rp   N)rQ   send_documentr3   )r>   r   rw   r^   rj   ri   r   rx   rl   rm   r   ro   r_   rp   rf   rh   ru   rJ   rK   rL   rM   r;   rA   rA   rB   r   m  s0    &zUser.send_documentr   )game_short_namer^   rj   rl   rm   ro   r_   rp   rf   rh   rJ   rK   rL   rM   r;   rC   c	                   s6   |   j| j|||	||||||||
||||dI dH S )a_  Shortcut for::

             await bot.send_game(update.effective_user.id, *args, **kwargs)

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

        Note:
            |user_chat_id_note|

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

        )r`   r   r^   rf   ro   rj   rJ   rK   rL   rM   r;   rh   rl   rm   r_   rp   N)rQ   	send_gamer3   )r>   r   r^   rj   rl   rm   ro   r_   rp   rf   rh   rJ   rK   rL   rM   r;   rA   rA   rB   r     s$     zUser.send_gamer   )#r   description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^   rj   provider_datasend_phone_number_to_providersend_email_to_providermax_tip_amountsuggested_tip_amountsrl   rm   ro   rp   rf   rh   rJ   rK   rL   rM   r;   rC   c          #   %      s\   |   j| j|||||||||	|
|||||||||||||||| |!|"||||||d#I dH S )aM  Shortcut for::

             await bot.send_invoice(update.effective_user.id, *args, **kwargs)

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

        Warning:
            As of API 5.2 :paramref:`start_parameter <telegram.Bot.send_invoice.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.

        Note:
            |user_chat_id_note|

        .. versionchanged:: 13.5
            As of Bot API 5.2, the parameter
            :paramref:`start_parameter <telegram.Bot.send_invoice.start_parameter>` is optional.

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

        )#r`   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r^   rf   ro   rj   r   r   r   rJ   rK   rL   rM   r;   rh   r   r   rl   rm   rp   N)rQ   send_invoicer3   )#r>   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r^   rj   r   r   r   r   r   rl   rm   ro   rp   rf   rh   rJ   rK   rL   rM   r;   rA   rA   rB   r     sJ    =zUser.send_invoice)rf   rh   locationrJ   rK   rL   rM   r;   r   )latitude	longituder^   rj   live_periodhorizontal_accuracyheadingproximity_alert_radiusrl   rm   ro   r_   rp   rf   rh   r   rJ   rK   rL   rM   r;   rC   c                   sB   |   j| j||||||||||||||||||	|
||dI dH S )ag  Shortcut for::

             await bot.send_location(update.effective_user.id, *args, **kwargs)

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

        Note:
            |user_chat_id_note|

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

        )r`   r   r   r^   rf   ro   rj   rJ   rK   rL   rM   r   r   r;   r   r   r   rh   rl   rm   r_   rp   N)rQ   send_locationr3   )r>   r   r   r^   rj   r   r   r   r   rl   rm   ro   r_   rp   rf   rh   r   rJ   rK   rL   rM   r;   rA   rA   rB   r   B  s0    &zUser.send_locationr   )	animationr   widthheightrw   ri   r^   rj   rx   rl   rm   ry   r   ro   r_   rp   rz   rf   rh   ru   rJ   rK   rL   rM   r;   rC   c                   sJ   |   j| j|||||||||||||||||	||
||||||dI dH S )ai  Shortcut for::

             await bot.send_animation(update.effective_user.id, *args, **kwargs)

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

        Note:
            |user_chat_id_note|

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

        )r`   r   r   r   r   rw   ri   r^   rf   ro   rj   rJ   rK   rL   rM   r;   rh   rx   ru   rl   rm   ry   r   r_   rp   rz   N)rQ   send_animationr3   )r>   r   r   r   r   rw   ri   r^   rj   rx   rl   rm   ry   r   ro   r_   rp   rz   rf   rh   ru   rJ   rK   rL   rM   r;   rA   rA   rB   r     s8    *zUser.send_animationr%   )stickerr^   rj   rl   rm   r   ro   r_   rp   rf   rh   rJ   rK   rL   rM   r;   rC   c
                   s8   |   j| j|||
|||||||||||||	dI dH S )ae  Shortcut for::

             await bot.send_sticker(update.effective_user.id, *args, **kwargs)

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

        Note:
            |user_chat_id_note|

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

        )r`   r   r^   rf   ro   rj   rJ   rK   rL   rM   r;   rh   rl   rm   r   r_   rp   N)rQ   send_stickerr3   )r>   r   r^   rj   rl   rm   r   ro   r_   rp   rf   rh   rJ   rK   rL   rM   r;   rA   rA   rB   r     s&    !zUser.send_stickerr)   )videor   rw   r^   rj   r   r   ri   supports_streamingrx   rl   rm   ry   r   ro   r_   rp   rz   rf   rh   ru   rJ   rK   rL   rM   r;   rC   c                   sL   |   j| j|||||||||||||||	||||
|||||||dI dH S )aa  Shortcut for::

             await bot.send_video(update.effective_user.id, *args, **kwargs)

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

        Note:
            |user_chat_id_note|

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

        )r`   r   r   rw   r^   rf   ro   rj   rJ   rK   rL   rM   r   r   ri   r   r   r;   rh   rx   ru   rl   rm   ry   r_   rp   rz   N)rQ   
send_videor3   )r>   r   r   rw   r^   rj   r   r   ri   r   rx   rl   rm   ry   r   ro   r_   rp   rz   rf   rh   ru   rJ   rK   rL   rM   r;   rA   rA   rB   r     s:    +zUser.send_video)rf   rh   venuerJ   rK   rL   rM   r;   r(   )r   r   r   addressfoursquare_idr^   rj   foursquare_typegoogle_place_idgoogle_place_typerl   rm   ro   r_   rp   rf   rh   r   rJ   rK   rL   rM   r;   rC   c                   sF   |   j| j|||||||||||||||||	|
|||||dI dH S )aa  Shortcut for::

             await bot.send_venue(update.effective_user.id, *args, **kwargs)

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

        Note:
            |user_chat_id_note|

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

        )r`   r   r   r   r   r   r^   rf   ro   rj   rJ   rK   rL   rM   r   r   r;   r   r   rh   rl   rm   r_   rp   N)rQ   
send_venuer3   )r>   r   r   r   r   r   r^   rj   r   r   r   rl   rm   ro   r_   rp   rf   rh   r   rJ   rK   rL   rM   r;   rA   rA   rB   r   F  s4    (zUser.send_venuer*   )
video_noter   lengthr^   rj   rl   rm   r   ro   r_   rp   rf   rh   ru   rJ   rK   rL   rM   r;   rC   c                   s>   |   j| j||||||	||||||||||||
|dI dH S )ak  Shortcut for::

             await bot.send_video_note(update.effective_user.id, *args, **kwargs)

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

        Note:
            |user_chat_id_note|

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

        )r`   r   r   r   r^   rf   ro   rj   rJ   rK   rL   rM   r;   rh   ru   rl   rm   r   r_   rp   N)rQ   send_video_noter3   )r>   r   r   r   r^   rj   rl   rm   r   ro   r_   rp   rf   rh   ru   rJ   rK   rL   rM   r;   rA   rA   rB   r     s,    $zUser.send_video_noter+   )voicer   rw   r^   rj   ri   rx   rl   rm   ro   r_   rp   rf   rh   ru   rJ   rK   rL   rM   r;   rC   c                   s@   |   j| j||||||
||||||||||||	||dI dH S )aa  Shortcut for::

             await bot.send_voice(update.effective_user.id, *args, **kwargs)

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

        Note:
            |user_chat_id_note|

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

        )r`   r   r   rw   r^   rf   ro   rj   rJ   rK   rL   rM   ri   r;   rh   rx   ru   rl   rm   r_   rp   N)rQ   
send_voicer3   )r>   r   r   rw   r^   rj   ri   rx   rl   rm   ro   r_   rp   rf   rh   ru   rJ   rK   rL   rM   r;   rA   rA   rB   r     s.    %zUser.send_voicer   )questionoptionsis_anonymoustypeallows_multiple_answerscorrect_option_id	is_closedr^   rj   explanationexplanation_parse_modeopen_period
close_dateexplanation_entitiesrl   rm   ro   r_   question_parse_modequestion_entitiesrp   rf   rh   rJ   rK   rL   rM   r;   rC   c                   sP   |   j| j|||||||||||	|||||
||||||||||||dI dH S )a_  Shortcut for::

             await bot.send_poll(update.effective_user.id, *args, **kwargs)

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

        Note:
            |user_chat_id_note|

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

        )r`   r   r   r   r   r   r   r   r^   rf   ro   rj   rJ   rK   rL   rM   r   r   r   r   r;   rh   r   rl   rm   r_   r   r   rp   N)rQ   	send_pollr3   )r>   r   r   r   r   r   r   r   r^   rj   r   r   r   r   r   rl   rm   ro   r_   r   r   rp   rf   rh   rJ   rK   rL   rM   r;   rA   rA   rB   r     s>    -zUser.send_pollr"   )from_chat_idr]   rw   ri   rx   r^   rj   rl   rm   ro   rz   rf   rh   rJ   rK   rL   rM   r;   rC   c                   s<   |   j| j||||||||
|||||||||	|dI dH S )am  Shortcut for::

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

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

        Note:
            |user_chat_id_note|

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

        )r`   r   r]   rw   ri   rx   r^   rf   ro   rh   rj   rJ   rK   rL   rM   r;   rl   rm   rz   NrQ   copy_messager3   )r>   r   r]   rw   ri   rx   r^   rj   rl   rm   ro   rz   rf   rh   rJ   rK   rL   rM   r;   rA   rA   rB   	send_copyN  s*    #zUser.send_copy)r`   r]   rw   ri   rx   r^   rj   rl   rm   ro   rz   rf   rh   rJ   rK   rL   rM   r;   rC   c                   s<   |   j| j||||||||
|||||||||	|dI dH S )au  Shortcut for::

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

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

        Note:
            |user_chat_id_note|

        Returns:
            :class:`telegram.MessageId`: On success, returns the MessageId of the sent message.

        )r   r`   r]   rw   ri   rx   r^   rf   ro   rh   rj   rJ   rK   rL   rM   r;   rl   rm   rz   Nr   )r>   r`   r]   rw   ri   rx   r^   rj   rl   rm   ro   rz   rf   rh   rJ   rK   rL   rM   r;   rA   rA   rB   r     s*    #zUser.copy_message)r"   .)r   rs   r^   rl   rm   remove_captionrJ   rK   rL   rM   r;   rC   c                   s.   |   j| j|||||||||	|
|dI dH S )a  Shortcut for::

             await bot.copy_messages(chat_id=update.effective_user.id, *argss, **kwargs)

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

        .. seealso:: :meth:`copy_message`, :meth:`send_copy`, :meth:`copy_messages`.

        .. versionadded:: 20.8

        Returns:
            Tuple[:class:`telegram.MessageId`]: On success, a tuple of :class:`~telegram.MessageId`
            of the sent messages is returned.

        )r`   r   rs   r^   rl   rm   r   rJ   rK   rL   rM   r;   NrQ   copy_messagesr3   )r>   r   rs   r^   rl   rm   r   rJ   rK   rL   rM   r;   rA   rA   rB   send_copies  s    zUser.send_copies)r`   rs   r^   rl   rm   r   rJ   rK   rL   rM   r;   rC   c                   s.   |   j| j|||||||||	|
|dI dH S )a  Shortcut for::

             await bot.copy_messages(from_chat_id=update.effective_user.id, *argss, **kwargs)

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

        .. seealso:: :meth:`copy_message`, :meth:`send_copy`, :meth:`send_copies`.

        .. versionadded:: 20.8

        Returns:
            Tuple[:class:`telegram.MessageId`]: On success, a tuple of :class:`~telegram.MessageId`
            of the sent messages is returned.

        )r   r`   rs   r^   rl   rm   r   rJ   rK   rL   rM   r;   Nr   )r>   r`   rs   r^   rl   rm   r   rJ   rK   rL   rM   r;   rA   rA   rB   r     s    zUser.copy_messages)r   r]   r^   rl   rm   rJ   rK   rL   rM   r;   rC   c                   s,   |   j| j|||||||	|
||dI dH S )a  Shortcut for::

             await bot.forward_message(chat_id=update.effective_user.id, *argss, **kwargs)

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

        .. seealso:: :meth:`forward_to`, :meth:`forward_messages_from`, :meth:`forward_messages_to`

        .. versionadded:: 20.0

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

        )r`   r   r]   r^   rJ   rK   rL   rM   r;   rl   rm   NrQ   Zforward_messager3   )r>   r   r]   r^   rl   rm   rJ   rK   rL   rM   r;   rA   rA   rB   forward_from  s    zUser.forward_from)r`   r]   r^   rl   rm   rJ   rK   rL   rM   r;   rC   c                   s,   |   j| j|||||||	|
||dI dH S )a  Shortcut for::

             await bot.forward_message(from_chat_id=update.effective_user.id, *argss, **kwargs)

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

        .. seealso:: :meth:`forward_from`, :meth:`forward_messages_from`,
            :meth:`forward_messages_to`

        .. versionadded:: 20.0

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

        )r   r`   r]   r^   rJ   rK   rL   rM   r;   rl   rm   Nr   )r>   r`   r]   r^   rl   rm   rJ   rK   rL   rM   r;   rA   rA   rB   
forward_toD  s    zUser.forward_to)r   rs   r^   rl   rm   rJ   rK   rL   rM   r;   rC   c                   s,   |   j| j|||||||||	|
dI dH S )a  Shortcut for::

             await bot.forward_messages(chat_id=update.effective_user.id, *argss, **kwargs)

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

        .. seealso:: :meth:`forward_to`, :meth:`forward_from`, :meth:`forward_messages_to`.

        .. versionadded:: 20.8

        Returns:
            Tuple[:class:`telegram.MessageId`]: On success, a tuple of :class:`~telegram.MessageId`
            of sent messages is returned.

        )r`   r   rs   r^   rl   rm   rJ   rK   rL   rM   r;   NrQ   Zforward_messagesr3   )r>   r   rs   r^   rl   rm   rJ   rK   rL   rM   r;   rA   rA   rB   forward_messages_fromo  s    zUser.forward_messages_from)r`   rs   r^   rl   rm   rJ   rK   rL   rM   r;   rC   c                   s,   |   j| j|||||||||	|
dI dH S )a  Shortcut for::

             await bot.forward_messages(from_chat_id=update.effective_user.id, *argss, **kwargs)

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

        .. seealso:: :meth:`forward_from`, :meth:`forward_to`, :meth:`forward_messages_from`.

        .. versionadded:: 20.8

        Returns:
            Tuple[:class:`telegram.MessageId`]: On success, a tuple of :class:`~telegram.MessageId`
            of sent messages is returned.

        )r   r`   rs   r^   rl   rm   rJ   rK   rL   rM   r;   Nr   )r>   r`   rs   r^   rl   rm   rJ   rK   rL   rM   r;   rA   rA   rB   forward_messages_to  s    zUser.forward_messages_to)r`   rJ   rK   rL   rM   r;   rC   c             	      s$   |   j| j||||||dI dH S )a  Shortcut for::

             await bot.approve_chat_join_request(user_id=update.effective_user.id, *args, **kwargs)

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

        Note:
            |user_chat_id_note|

        .. versionadded:: 13.8

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

        rP   r`   rJ   rK   rL   rM   r;   N)rQ   Zapprove_chat_join_requestr3   r>   r`   rJ   rK   rL   rM   r;   rA   rA   rB   approve_join_request  s    zUser.approve_join_requestc             	      s$   |   j| j||||||dI dH S )a  Shortcut for::

             await bot.decline_chat_join_request(user_id=update.effective_user.id, *args, **kwargs)

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

        Note:
            |user_chat_id_note|

        .. versionadded:: 13.8

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

        r   N)rQ   Zdecline_chat_join_requestr3   r   rA   rA   rB   decline_join_request  s    zUser.decline_join_request)menu_buttonrJ   rK   rL   rM   r;   rC   c             	      s$   |   j| j||||||dI dH S )a  Shortcut for::

             await bot.set_chat_menu_button(chat_id=update.effective_user.id, *argss, **kwargs)

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

        .. seealso:: :meth:`get_menu_button`

        Note:
            |user_chat_id_note|

        .. versionadded:: 20.0

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.
        )r`   r   rJ   rK   rL   rM   r;   N)rQ   Zset_chat_menu_buttonr3   )r>   r   rJ   rK   rL   rM   r;   rA   rA   rB   set_menu_button  s    zUser.set_menu_buttonc                   s"   |   j| j|||||dI dH S )a  Shortcut for::

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

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

        .. seealso:: :meth:`set_menu_button`

        Note:
            |user_chat_id_note|

        .. versionadded:: 20.0

        Returns:
            :class:`telegram.MenuButton`: On success, the current menu button is returned.
        rc   N)rQ   Zget_chat_menu_buttonr3   rd   rA   rA   rB   get_menu_button2  s    zUser.get_menu_buttonr&   c             	      s$   |   j|| j|||||dI dH S )az  Shortcut for::

             await bot.get_user_chat_boosts(user_id=update.effective_user.id, *args, **kwargs)

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

        .. versionadded:: 20.8

        Returns:
            :class:`telegram.UserChatBoosts`: On success, returns the boosts applied by the user.
        )r`   rP   rJ   rK   rL   rM   r;   N)rQ   Zget_user_chat_boostsr3   r   rA   rA   rB   get_chat_boostsU  s    zUser.get_chat_boosts)telegram_payment_charge_idrJ   rK   rL   rM   r;   rC   c             	      s$   |   j| j||||||dI dH S )aT  Shortcut for::

             await bot.refund_star_payment(user_id=update.effective_user.id, *args, **kwargs)

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

        .. versionadded:: 21.3

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.
        )rP   r   rJ   rK   rL   rM   r;   N)rQ   refund_star_paymentr3   )r>   r   rJ   rK   rL   rM   r;   rA   rA   rB   r   u  s    zUser.refund_star_payment)
NNNNNNNNNN)NN)N)N)N)N)NN)NN)N)H__name__
__module____qualname____doc__	__slots__intstrboolr   r   r=   propertyrG   rE   rI   r   r   floatrR   r   rX   r   r   r\   ra   rb   re   r   r   rq   rr   rt   r   r   r{   r   r}   r   r   Zsend_actionr   r   r   r   objectr   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   __classcell__rA   rA   r?   rB   r,   >   s	  N          '
  '  &#
?$#

D
=

F  %=6

B;
eB

J
8

KF
>

A

Q

=

=	
1	
1
.
/
/
/
(
& ('
$r,   N)6r   r   typingr   r   r   r   r   Z%telegram._inline.inlinekeyboardbuttonr   Ztelegram._menubuttonr	   Ztelegram._telegramobjectr
   Ztelegram._utils.defaultvaluer   Ztelegram._utils.typesr   r   r   r   r   Ztelegram.helpersr   rY   r   rT   Ztelegramr   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,   rA   rA   rA   rB   <module>   s   l