§
    §eîi1"  ã                   ó²   — d Z ddl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 ddlmZ dd	lmZmZ dd
lmZ ddlmZmZ erddlmZ  G d„ de
¦  «        ZdS )zJThis module contains an object that represents a Telegram ChatJoinRequest.é    N)ÚTYPE_CHECKING)ÚChat)ÚChatInviteLink)ÚTelegramObject)ÚUser)Úde_json_optional)Úextract_tzinfo_from_defaultsÚfrom_timestamp)ÚDEFAULT_NONE)ÚJSONDictÚODVInput)ÚBotc                   ó^  ‡ — e Zd ZdZdZ	 	 dddœdededej        de	d	e
dz  d
edz  dedz  fˆ fd„Zeddedddd fˆ fd„¦   «         Zeeeeddœdee         dee         dee         dee         dedz  defd„Zeeeeddœdee         dee         dee         dee         dedz  defd„Zˆ xZS )ÚChatJoinRequestaE  This object represents a join request sent to a chat.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`chat`, :attr:`from_user` and :attr:`date` are equal.

    Note:
        * Since Bot API 5.5, bots are allowed to contact users who sent a join request to a chat
          where the bot is an administrator with the
          :attr:`~telegram.ChatMemberAdministrator.can_invite_users` administrator right - even
          if the user never interacted with the bot before.
        * Telegram does not guarantee that :attr:`from_user.id <from_user>` coincides with the
          ``chat_id`` of the user. Please use :attr:`user_chat_id` to contact the user in
          response to their join request.

    .. versionadded:: 13.8
    .. versionchanged:: 20.1
       In Bot API 6.5 the argument :paramref:`user_chat_id` was added, which changes the position
       of the optional arguments :paramref:`bio` and :paramref:`invite_link`.

    Args:
        chat (:class:`telegram.Chat`): Chat to which the request was sent.
        from_user (:class:`telegram.User`): User that sent the join request.
        date (:class:`datetime.datetime`): Date the request was sent.

            .. versionchanged:: 20.3
                |datetime_localization|
        user_chat_id (:obj:`int`): Identifier of a private chat with the user who sent the join
            request. This number may have more than 32 significant bits and some programming
            languages may have difficulty/silent defects in interpreting it. But it has at most 52
            significant bits, so a 64-bit integer or double-precision float type are safe for
            storing this identifier. The bot can use this identifier for 5 minutes to send messages
            until the join request is processed, assuming no other administrator contacted the
            user.

            .. versionadded:: 20.1
        bio (:obj:`str`, optional): Bio of the user.
        invite_link (:class:`telegram.ChatInviteLink`, optional): Chat invite link that was used
            by the user to send the join request.

    Attributes:
        chat (:class:`telegram.Chat`): Chat to which the request was sent.
        from_user (:class:`telegram.User`): User that sent the join request.
        date (:class:`datetime.datetime`): Date the request was sent.

            .. versionchanged:: 20.3
                |datetime_localization|
        user_chat_id (:obj:`int`): Identifier of a private chat with the user who sent the join
            request. This number may have more than 32 significant bits and some programming
            languages may have difficulty/silent defects in interpreting it. But it has at most 52
            significant bits, so a 64-bit integer or double-precision float type are safe for
            storing this identifier. The bot can use this identifier for 5 minutes to send messages
            until the join request is processed, assuming no other administrator contacted the
            user.

            .. versionadded:: 20.1
        bio (:obj:`str`): Optional. Bio of the user.
        invite_link (:class:`telegram.ChatInviteLink`): Optional. Chat invite link that was used
            by the user to send the join request.

            Note:
                When a user joins a *public* group via an invite link, this attribute may not
                be present. However, this behavior is undocument and may be subject to change.
                See `this GitHub thread <https://github.com/tdlib/telegram-bot-api/issues/428>`_
                for some discussion.

    )ÚbioÚchatÚdateÚ	from_userÚinvite_linkÚuser_chat_idN©Ú
api_kwargsr   r   r   r   r   r   r   c                óú   •— t          ¦   «                              |¬¦  «         || _        || _        || _        || _        || _        || _        | j        | j        | j        f| _        |  	                    ¦   «          d S )Nr   )
ÚsuperÚ__init__r   r   r   r   r   r   Ú	_id_attrsÚ_freeze)	Úselfr   r   r   r   r   r   r   Ú	__class__s	           €ú]/home/div/.hermes/hermes-agent/venv/lib/python3.11/site-packages/telegram/_chatjoinrequest.pyr   zChatJoinRequest.__init__k   ss   ø€ õ 	‰Œ×Ò JÐÑ/Ô/Ð/àˆŒ	Ø(ˆŒØ"&ˆŒ	Ø!-ˆÔð  #ˆŒØ2=ˆÔàœ) T¤^°T´YÐ?ˆŒà�Š‰Œˆˆˆó    ÚdataÚbotz
Bot | NoneÚreturnc                 óì  •— |                       |¦  «        }t          |¦  «        }t          |                     d¦  «        t          |¦  «        |d<   t          |                     dd¦  «        t          |¦  «        |d<   t          |                     dd¦  «        |¬¦  «        |d<   t          |                     d¦  «        t          |¦  «        |d<   t          ¦   «          
                    ||¬¦  «        S )	z,See :meth:`telegram.TelegramObject.de_json`.r   ÚfromNr   r   )Útzinfor   )r"   r#   )Ú_parse_datar	   r   Úgetr   Úpopr   r
   r   r   Úde_json)Úclsr"   r#   Ú
loc_tzinfor   s       €r    r+   zChatJoinRequest.de_json…   sË   ø€ ð �Š˜tÑ$Ô$ˆõ 2°#Ñ6Ô6ˆ
å'¨¯ª°Ñ(8Ô(8½$ÀÑDÔDˆˆV‰Ý,¨T¯XªX°f¸dÑ-CÔ-CÅTÈ3ÑOÔOˆˆ[ÑÝ% d§h¢h¨v°tÑ&<Ô&<ÀZÐPÑPÔPˆˆV‰Ý.¨t¯xªx¸Ñ/FÔ/FÍÐX[Ñ\Ô\ˆˆ]Ñå‰wŒw�Š D¨cˆÑ2Ô2Ð2r!   )Úread_timeoutÚwrite_timeoutÚconnect_timeoutÚpool_timeoutr   r.   r/   r0   r1   c          	   ƒ   ó–   K  — |                       ¦   «                              | j        j        | j        j        |||||¬¦  «        ƒ d{V —†S )a€  Shortcut for::

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

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

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

        ©Úchat_idÚuser_idr.   r/   r0   r1   r   N)Úget_botÚapprove_chat_join_requestr   Úidr   ©r   r.   r/   r0   r1   r   s         r    ÚapprovezChatJoinRequest.approve”   ói   è è € ð, —\’\‘^”^×=Ò=Ø”I”LØ”NÔ%Ø%Ø'Ø+Ø%Ø!ð >ñ 
ô 
ð 
ð 
ð 
ð 
ð 
ð 
ð 	
r!   c          	   ƒ   ó–   K  — |                       ¦   «                              | j        j        | j        j        |||||¬¦  «        ƒ d{V —†S )a€  Shortcut for::

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

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

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

        r3   N)r6   Údecline_chat_join_requestr   r8   r   r9   s         r    ÚdeclinezChatJoinRequest.decline´   r;   r!   )NN)N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   r   ÚdtmÚdatetimeÚintÚstrr   r   r   Úclassmethodr+   r   r   ÚfloatÚboolr:   r>   Ú__classcell__)r   s   @r    r   r   %   s  ø€ € € € € ðAð AðF T€Ið Ø-1ðð '+ðð ð àðð ðð Œlð	ð
 ðð �4‰Zðð $ dÑ*ðð ˜t‘Oðð ð ð ð ð ð4 ð3ð 3˜8ð 3¨,ð 3ÐBSð 3ð 3ð 3ð 3ð 3ñ „[ð3ð" )5Ø)5Ø+7Ø(4Ø&*ð
ð 
ð 
ð ˜u”oð
ð   ”ð	
ð
 " %œð
ð ˜u”oð
ð ˜t‘Oð
ð 
ð
ð 
ð 
ð 
ðF )5Ø)5Ø+7Ø(4Ø&*ð
ð 
ð 
ð ˜u”oð
ð   ”ð	
ð
 " %œð
ð ˜u”oð
ð ˜t‘Oð
ð 
ð
ð 
ð 
ð 
ð 
ð 
ð 
ð 
r!   r   )rB   rE   rD   Útypingr   Útelegram._chatr   Útelegram._chatinvitelinkr   Útelegram._telegramobjectr   Útelegram._userr   Útelegram._utils.argumentparsingr   Útelegram._utils.datetimer	   r
   Útelegram._utils.defaultvaluer   Útelegram._utils.typesr   r   Útelegramr   r   © r!   r    ú<module>rW      s   ðð& QÐ Pà Ð Ð Ð Ø  Ð  Ð  Ð  Ð  Ð  à Ð Ð Ð Ð Ð Ø 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø Ð Ð Ð Ð Ð Ø <Ð <Ð <Ð <Ð <Ð <Ø QÐ QÐ QÐ QÐ QÐ QÐ QÐ QØ 5Ð 5Ð 5Ð 5Ð 5Ð 5Ø 4Ð 4Ð 4Ð 4Ð 4Ð 4Ð 4Ð 4àð ØÐÐÐÐÐðm
ð m
ð m
ð m
ð m
�nñ m
ô m
ð m
ð m
ð m
r!   