U
    2tc                     @   s  d Z ddlmZ ddlmZmZmZmZmZmZ ddl	m
Z
mZmZ ddlmZ ddlmZmZmZ ddlmZ ddlmZmZmZmZ erd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.m/Z/m0Z0m1Z1 G d
d de
Z2dS )z?This module contains an object that represents a Telegram User.    )datetime)TYPE_CHECKINGAnyListOptionalUnionTuple)TelegramObject	constants
MenuButton)InlineKeyboardButton)mention_htmlDEFAULT_NONE
DEFAULT_20)mention_markdown)JSONDict	FileInputODVInputDVInput)BotMessageUserProfilePhotos	MessageIdInputMediaAudioInputMediaDocumentInputMediaPhotoInputMediaVideoMessageEntityReplyMarkup	PhotoSizeAudioContactDocumentInlineKeyboardMarkupLabeledPriceLocation	AnimationStickerVideoVenue	VideoNoteVoicec                   @   s	  e Zd ZdZdZdeeeeeeeeedeeedddZ	e
edd	d
Ze
edddZe
ee dddZddedfeeee eed dddZdeedddZdeedddZdeedddZdeedddZeedfeee ee eedddZeddfee eeed d!d"Zedfee eed#d$d%Zeeeddededdf
eee ee ee ed&ee eee eed' ed( f ed)d*d+d,Z dedde!ededddfee"d-f eee ed&ee ee eee eed' ed( f eed)d.d/d0Z#ede!dedfeed1  ee eee eee eed) d2d3d4Z$ddddedde!eddedddfee"d5f eeeeee ed&ee ee e"eee eed' ed( f eed)d6d7d8Z%edfeee eed9d:d;Z&e&Z'dddeddedddedfeeeee ed&ee d<eeee ed)d=d>d?Z(eddeddedfee ed&ee eeee ed)d@	dAdBZ)ddedde!edddeddfee"dCf eeee ed&ee ee e"eeee eed' ed( f ed)dDdEdFZ*eddededfeee edGee eee ed)dH	dIdJZ+d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dK eeeeeeeeeeee edGeee,f eeee eee eee ed)dLdMdNZ-ddeddeddddddedfeeee ed&ee dOeeeeeee ed)dPdQdRZ.dddddeedde!dedddfee"dSf eeee"eee ee ed&ee eee eed' ed( f eed)dTdUdVZ/edde!dedfee"dWf ee ed&ee eee ed)dX	dYdZZ0ddedde!ddedddedddfee"d[f eeee ed&ee eeee ee"eee eed' ed( f eed)d\d]d^Z1dddddeddedddddedfeeeeeee ed&ee d_eeeeee ed)d`dadbZ2ddedde!ddeddfee"dcf eeee ed&ee e"eee eed)dddedfZ3ddedde!ededddfee"dgf eeee ed&ee ee eee eed' ed( f eed)dhdidjZ4dke5j6dld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d&ee eee eeee7f eee eed' ed( f ed)dmdndoZ8dededededdf
eeef eeee eed( ed' f ee eee d&ee eedpdqdrdsZ9dededededdf
eeef eeee eed( ed' f ee eee d&ee eedpdtdudvZ:edfeeef ee eedwdxdyZ;edfeeef ee eedwdzd{Z<dedfe=ee eed|d}d~Z>edfee ee=d#ddZ?dS )UseraC  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.

    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 bots first name.
        last_name (:obj:`str`, optional): User's or bots last name.
        username (:obj:`str`, optional): User's or bots 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.
        bot (:class:`telegram.Bot`, optional): The Bot to use for instance methods.
        is_premium (:obj:`bool`, optional): :obj:`True`, if this user is a Telegram Premium user.

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

            .. versionadded:: 13.13

    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.
        bot (:class:`telegram.Bot`): Optional. The Bot to use for instance methods.
        is_premium (:obj:`bool`): Optional. :obj:`True`, if this user is a Telegram
            Premium user.

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

            .. versionadded:: 13.13

    )is_botcan_read_all_group_messagesusername
first_name	last_namecan_join_groupssupports_inline_queriesidbotlanguage_code
is_premiumadded_to_attachment_menu	_id_attrsNr   )r4   r0   r-   r1   r/   r6   r2   r.   r3   r5   r7   r8   _kwargsc                 K   sZ   t || _|| _|| _|| _|| _|| _|| _|| _|	| _	|| _
|| _|
| _| jf| _d S )N)intr4   r0   r-   r1   r/   r6   r2   r.   r3   r7   r8   r5   r9   )selfr4   r0   r-   r1   r/   r6   r2   r.   r3   r5   r7   r8   r:    r=   1/tmp/pip-unpacked-wheel-2u9rcp5s/telegram/user.py__init__   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`.
        @)r/   	full_namer<   r=   r=   r>   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`.
         )r1   r0   rC   r=   r=   r>   rB      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)r/   rC   r=   r=   r>   link   s    z	User.linkd   r   )offsetlimittimeout
api_kwargsr@   c                 C   s   | j j| j||||dS )z
        Shortcut for::

            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_idrH   rI   rJ   rK   )r5   Zget_user_profile_photosr4   )r<   rH   rI   rJ   rK   r=   r=   r>   get_profile_photos   s    zUser.get_profile_photos)rD   r@   c                 C   s   |rt | j|S t | j| jS )a  
        Note:
            :attr:`telegram.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).

        util_mention_markdownr4   rB   r<   rD   r=   r=   r>   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).

           )versionrN   rP   r=   r=   r>   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.

        )util_mention_htmlr4   rB   rP   r=   r=   r>   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   rB   r4   rP   r=   r=   r>   mention_button  s    zUser.mention_button)
message_iddisable_notificationrJ   rK   r@   c                 C   s   | j j| j||||dS )ae  Shortcut for::

             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`.

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

        )chat_idrX   rY   rJ   rK   )r5   Zpin_chat_messager4   )r<   rX   rY   rJ   rK   r=   r=   r>   pin_message  s    zUser.pin_message)rJ   rK   rX   r@   c                 C   s   | j j| j|||dS )am  Shortcut for::

             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`.

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

        )rZ   rJ   rK   rX   )r5   Zunpin_chat_messager4   )r<   rJ   rK   rX   r=   r=   r>   unpin_message-  s    zUser.unpin_message)rJ   rK   r@   c                 C   s   | j j| j||dS )a  Shortcut for::

             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`.

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

        rZ   rJ   rK   )r5   Zunpin_all_chat_messagesr4   r<   rJ   rK   r=   r=   r>   unpin_all_messagesF  s
    zUser.unpin_all_messagesr   r   )r   .r   )rU   
parse_modedisable_web_page_previewrY   reply_to_message_idreply_markuprJ   rK   allow_sending_without_replyentitiesprotect_contentr@   c                 C   s&   | j j| j|||||||||	|
|dS )a/  Shortcut for::

            bot.send_message(update.effective_user.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.

        )rZ   rU   r`   ra   rY   rb   rc   rJ   rK   rd   re   rf   )r5   send_messager4   )r<   rU   r`   ra   rY   rb   rc   rJ   rK   rd   re   rf   r=   r=   r>   rg   ^  s    zUser.send_messager   )photocaptionrY   rb   rc   rJ   r`   rK   rd   caption_entitiesfilenamerf   r@   c                 C   s(   | j j| j|||||||||	|
||dS )a+  Shortcut for::

            bot.send_photo(update.effective_user.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.

        )rZ   rh   ri   rY   rb   rc   rJ   r`   rK   rd   rj   rk   rf   )r5   
send_photor4   )r<   rh   ri   rY   rb   rc   rJ   r`   rK   rd   rj   rk   rf   r=   r=   r>   rl     s    zUser.send_photo)r   r   r   r   )mediarY   rb   rJ   rK   rd   rf   r@   c              
   C   s   | j j| j|||||||dS )a=  Shortcut for::

            bot.send_media_group(update.effective_user.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.

        )rZ   rm   rY   rb   rJ   rK   rd   rf   )r5   send_media_groupr4   )r<   rm   rY   rb   rJ   rK   rd   rf   r=   r=   r>   rn     s    zUser.send_media_groupr    )audioduration	performertitleri   rY   rb   rc   rJ   r`   thumbrK   rd   rj   rk   rf   r@   c                 C   s0   | j j| j|||||||||	|
||||||dS )a+  Shortcut for::

            bot.send_audio(update.effective_user.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.

        )rZ   ro   rp   rq   rr   ri   rY   rb   rc   rJ   r`   rs   rK   rd   rj   rk   rf   )r5   
send_audior4   )r<   ro   rp   rq   rr   ri   rY   rb   rc   rJ   r`   rs   rK   rd   rj   rk   rf   r=   r=   r>   rt     s&    zUser.send_audio)actionrJ   rK   r@   c                 C   s   | j j| j|||dS )zShortcut for::

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

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

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

        )rZ   ru   rJ   rK   )r5   send_chat_actionr4   )r<   ru   rJ   rK   r=   r=   r>   rv      s    zUser.send_chat_actionr!   )phone_numberr0   r1   rY   rb   rc   rJ   contactvcardrK   rd   rf   r@   c                 C   s(   | j j| j|||||||||	|
||dS )a/  Shortcut for::

            bot.send_contact(update.effective_user.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.

        )rZ   rw   r0   r1   rY   rb   rc   rJ   rx   ry   rK   rd   rf   )r5   send_contactr4   )r<   rw   r0   r1   rY   rb   rc   rJ   rx   ry   rK   rd   rf   r=   r=   r>   rz     s    zUser.send_contact)	rY   rb   rc   rJ   emojirK   rd   rf   r@   c	           	      C   s    | j j| j||||||||d	S )a)  Shortcut for::

            bot.send_dice(update.effective_user.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.

        )	rZ   rY   rb   rc   rJ   r{   rK   rd   rf   )r5   	send_dicer4   )	r<   rY   rb   rc   rJ   r{   rK   rd   rf   r=   r=   r>   r|   C  s    zUser.send_dicer"   )documentrk   ri   rY   rb   rc   rJ   r`   rs   rK   disable_content_type_detectionrd   rj   rf   r@   c                 C   s,   | j j| j|||||||||	|
||||dS )a1  Shortcut for::

            bot.send_document(update.effective_user.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.

        )rZ   r}   rk   ri   rY   rb   rc   rJ   r`   rs   rK   r~   rd   rj   rf   )r5   send_documentr4   )r<   r}   rk   ri   rY   rb   rc   rJ   r`   rs   rK   r~   rd   rj   rf   r=   r=   r>   r   d  s"    zUser.send_documentr#   )	game_short_namerY   rb   rc   rJ   rK   rd   rf   r@   c	           	      C   s    | j j| j||||||||d	S )a)  Shortcut for::

            bot.send_game(update.effective_user.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.

        )	rZ   r   rY   rb   rc   rJ   rK   rd   rf   )r5   	send_gamer4   )	r<   r   rY   rb   rc   rJ   rK   rd   rf   r=   r=   r>   r     s    zUser.send_gamer$   )rr   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_flexiblerY   rb   rc   provider_datasend_phone_number_to_providersend_email_to_providerrJ   rK   rd   max_tip_amountsuggested_tip_amountsrf   r@   c                 C   sH   | j j| j|||||||||	|
||||||||||||||||||dS )a  Shortcut for::

            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 :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.

        )rZ   rr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rY   rb   rc   r   r   r   rJ   rK   rd   r   r   rf   )r5   send_invoicer4   )r<   rr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rY   rb   rc   r   r   r   rJ   rK   rd   r   r   rf   r=   r=   r>   r     s>    1zUser.send_invoicer%   )latitude	longituderY   rb   rc   rJ   locationlive_periodrK   horizontal_accuracyheadingproximity_alert_radiusrd   rf   r@   c                 C   s,   | j j| j|||||||||	|
||||dS )a1  Shortcut for::

            bot.send_location(update.effective_user.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.

        )rZ   r   r   rY   rb   rc   rJ   r   r   rK   r   r   r   rd   rf   )r5   send_locationr4   )r<   r   r   rY   rb   rc   rJ   r   r   rK   r   r   r   rd   rf   r=   r=   r>   r     s"    zUser.send_locationr&   )	animationrp   widthheightrs   ri   r`   rY   rb   rc   rJ   rK   rd   rj   rk   rf   r@   c                 C   s0   | j j| j|||||||||	|
||||||dS )a3  Shortcut for::

            bot.send_animation(update.effective_user.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.

        )rZ   r   rp   r   r   rs   ri   r`   rY   rb   rc   rJ   rK   rd   rj   rk   rf   )r5   send_animationr4   )r<   r   rp   r   r   rs   ri   r`   rY   rb   rc   rJ   rK   rd   rj   rk   rf   r=   r=   r>   r   0  s&    zUser.send_animationr'   )	stickerrY   rb   rc   rJ   rK   rd   rf   r@   c	           	      C   s    | j j| j||||||||d	S )a/  Shortcut for::

            bot.send_sticker(update.effective_user.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.

        )	rZ   r   rY   rb   rc   rJ   rK   rd   rf   )r5   send_stickerr4   )	r<   r   rY   rb   rc   rJ   rK   rd   rf   r=   r=   r>   r   a  s    zUser.send_stickerr(   )videorp   ri   rY   rb   rc   rJ   r   r   r`   supports_streamingrs   rK   rd   rj   rk   rf   r@   c                 C   s2   | j j| j|||||||||	|
|||||||dS )a+  Shortcut for::

            bot.send_video(update.effective_user.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.

        )rZ   r   rp   ri   rY   rb   rc   rJ   r   r   r`   r   rs   rK   rd   rj   rk   rf   )r5   
send_videor4   )r<   r   rp   ri   rY   rb   rc   rJ   r   r   r`   r   rs   rK   rd   rj   rk   rf   r=   r=   r>   r     s(    zUser.send_videor)   )r   r   rr   addressfoursquare_idrY   rb   rc   rJ   venuefoursquare_typerK   google_place_idgoogle_place_typerd   rf   r@   c                 C   s0   | j j| j|||||||||	|
||||||dS )a+  Shortcut for::

            bot.send_venue(update.effective_user.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.

        )rZ   r   r   rr   r   r   rY   rb   rc   rJ   r   r   rK   r   r   rd   rf   )r5   
send_venuer4   )r<   r   r   rr   r   r   rY   rb   rc   rJ   r   r   rK   r   r   rd   rf   r=   r=   r>   r     s&    zUser.send_venuer*   )
video_noterp   lengthrY   rb   rc   rJ   rs   rK   rd   rk   rf   r@   c                 C   s(   | j j| j|||||||||	|
||dS )a5  Shortcut for::

            bot.send_video_note(update.effective_user.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.

        )rZ   r   rp   r   rY   rb   rc   rJ   rs   rK   rd   rk   rf   )r5   send_video_noter4   )r<   r   rp   r   rY   rb   rc   rJ   rs   rK   rd   rk   rf   r=   r=   r>   r     s    zUser.send_video_noter+   )voicerp   ri   rY   rb   rc   rJ   r`   rK   rd   rj   rk   rf   r@   c                 C   s*   | j j| j|||||||||	|
|||dS )a+  Shortcut for::

            bot.send_voice(update.effective_user.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.

        )rZ   r   rp   ri   rY   rb   rc   rJ   r`   rK   rd   rj   rk   rf   )r5   
send_voicer4   )r<   r   rp   ri   rY   rb   rc   rJ   r`   rK   rd   rj   rk   rf   r=   r=   r>   r     s     zUser.send_voiceTF)questionoptionsis_anonymoustypeallows_multiple_answerscorrect_option_id	is_closedrY   rb   rc   rJ   explanationexplanation_parse_modeopen_period
close_daterK   rd   explanation_entitiesrf   r@   c                 C   s6   | j j| j|||||||||	|
|||||||||dS )a)  Shortcut for::

            bot.send_poll(update.effective_user.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.

        )rZ   r   r   r   r   r   r   r   rY   rb   rc   rJ   r   r   r   r   rK   rd   r   rf   )r5   	send_pollr4   )r<   r   r   r   r   r   r   r   rY   rb   rc   rJ   r   r   r   r   rK   rd   r   rf   r=   r=   r>   r   :  s,    !zUser.send_pollr   )from_chat_idrX   ri   r`   rj   rY   rb   rd   rc   rJ   rK   rf   r@   c                 C   s(   | j j| j|||||||||	|
||dS )a7  Shortcut for::

            bot.copy_message(chat_id=update.effective_user.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.

        )rZ   r   rX   ri   r`   rj   rY   rb   rd   rc   rJ   rK   rf   r5   copy_messager4   )r<   r   rX   ri   r`   rj   rY   rb   rd   rc   rJ   rK   rf   r=   r=   r>   	send_copyr  s    zUser.send_copy)rZ   rX   ri   r`   rj   rY   rb   rd   rc   rJ   rK   rf   r@   c                 C   s(   | j j| j|||||||||	|
||dS )a<  Shortcut for::

            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`.

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

        )r   rZ   rX   ri   r`   rj   rY   rb   rd   rc   rJ   rK   rf   r   )r<   rZ   rX   ri   r`   rj   rY   rb   rd   rc   rJ   rK   rf   r=   r=   r>   r     s    zUser.copy_message)rZ   rJ   rK   r@   c                 C   s   | j j| j|||dS )aZ  Shortcut for::

            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`.

        .. versionadded:: 13.8

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

        rL   rZ   rJ   rK   )r5   Zapprove_chat_join_requestr4   r<   rZ   rJ   rK   r=   r=   r>   approve_join_request  s       zUser.approve_join_requestc                 C   s   | j j| j|||dS )aZ  Shortcut for::

            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`.

        .. versionadded:: 13.8

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

        r   )r5   Zdecline_chat_join_requestr4   r   r=   r=   r>   decline_join_request  s       zUser.decline_join_request)menu_buttonrJ   rK   r@   c                 C   s   | j j| j|||dS )a~  Shortcut for::

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

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

        ..seealso:: :meth:`get_menu_button`

        .. versionadded:: 13.12

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.
        )rZ   r   rJ   rK   )r5   Zset_chat_menu_buttonr4   )r<   r   rJ   rK   r=   r=   r>   set_menu_button  s    zUser.set_menu_buttonc                 C   s   | j j| j||dS )a  Shortcut for::

             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`

        .. versionadded:: 13.12

        Returns:
            :class:`telegram.MenuButton`: On success, the current menu button is returned.
        r]   )r5   Zget_chat_menu_buttonr4   r^   r=   r=   r>   get_menu_button  s
    zUser.get_menu_button)	NNNNNNNNN)N)N)N)N)@__name__
__module____qualname____doc__	__slots__r;   strboolr   r?   propertyrD   rB   r   rF   r   r   floatr   rM   r   rS   r   r   rW   r[   r\   r_   r   r   r   r   rg   r   r   rl   rn   rt   rv   Zsend_actionrz   r|   r   r   objectr   r   r   r   r   r   r   r   r
   ZPOLL_REGULARr   r   r   r   r   r   r   r   r   r=   r=   r=   r>   r,   >   s(  4         !
*
.$
4+$
0)
S0
4
$
54
,
/
<
-
,

r,   N)3r   r   typingr   r   r   r   r   r   Ztelegramr	   r
   r   Z$telegram.inline.inlinekeyboardbuttonr   Ztelegram.utils.helpersr   rT   r   r   r   rO   Ztelegram.utils.typesr   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*   r+   r,   r=   r=   r=   r>   <module>   s    d