Ë
    S"“j   ã                   ó4   — d dl mZmZ ddl mZ  G d„ d«      Zy)é   )ÚtypesÚ	functionsé   )Úutilsc                   óÎ   — e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdddœd„Zed„ «       Zed„ «       Zed„ «       Zed„ «       Zed„ «       Zed„ «       Zed„ «       Z	 	 	 dd„Zd„ Zy)ÚInlineResulta'  
    Custom class that encapsulates a bot inline result providing
    an abstraction to easily access some commonly needed features
    (such as clicking a result to select it).

    Attributes:

        result (:tl:`BotInlineResult`):
            The original :tl:`BotInlineResult` object.
    ÚarticleÚphotoÚgifÚvideoÚ	mpeg4_gifÚaudioÚdocumentÚlocationÚvenueÚcontactÚgameN)Úentityc                ó<   — || _         || _        || _        || _        y ©N)Ú_clientÚresultÚ	_query_idÚ_entity)ÚselfÚclientÚoriginalÚquery_idr   s        ú`/var/www/api.ozpay.ru/ozpay/venv/lib/python3.12/site-packages/telethon/tl/custom/inlineresult.pyÚ__init__zInlineResult.__init__    s   € ØˆŒØˆŒØ!ˆŒØˆ�ó    c                 ó.   — | j                   j                  S )a™  
        The always-present type of this result. It will be one of:
        ``'article'``, ``'photo'``, ``'gif'``, ``'mpeg4_gif'``, ``'video'``,
        ``'audio'``, ``'voice'``, ``'document'``, ``'location'``, ``'venue'``,
        ``'contact'``, ``'game'``.

        You can access all of these constants through `InlineResult`,
        such as `InlineResult.ARTICLE`, `InlineResult.VIDEO_GIF`, etc.
        )r   Útype©r   s    r   r#   zInlineResult.type&   s   € ð �{‰{×ÑÐr!   c                 ó.   — | j                   j                  S )zz
        The always-present :tl:`BotInlineMessage` that
        will be sent if `click` is called on this result.
        )r   Úsend_messager$   s    r   ÚmessagezInlineResult.message3   s   € ð �{‰{×'Ñ'Ð'r!   c                 ó.   — | j                   j                  S )zE
        The title for this inline result. It may be `None`.
        )r   Útitler$   s    r   r)   zInlineResult.title;   s   € ð
 �{‰{× Ñ Ð r!   c                 ó.   — | j                   j                  S )zK
        The description for this inline result. It may be `None`.
        )r   Údescriptionr$   s    r   r+   zInlineResult.descriptionB   s   € ð
 �{‰{×&Ñ&Ð&r!   c                 óx   — t        | j                  t        j                  «      r| j                  j                  S y)zÃ
        The URL present in this inline results. If you want to "click"
        this URL to open it in your browser, you should use Python's
        `webbrowser.open(url)` for such task.
        N)Ú
isinstancer   r   ÚBotInlineResultÚurlr$   s    r   r/   zInlineResult.urlI   s+   € ô �d—k‘k¤5×#8Ñ#8Ô9Ø—;‘;—?‘?Ð"ð :r!   c                 óì   — t        | j                  t        j                  «      r| j                  j                  S t        | j                  t        j
                  «      r| j                  j                  S y)z�
        Returns either the :tl:`WebDocument` thumbnail for
        normal results or the :tl:`Photo` for media results.
        N)r-   r   r   r.   ÚthumbÚBotInlineMediaResultr
   r$   s    r   r
   zInlineResult.photoS   sR   € ô �d—k‘k¤5×#8Ñ#8Ô9Ø—;‘;×$Ñ$Ð$Ü˜Ÿ™¤U×%?Ñ%?Ô@Ø—;‘;×$Ñ$Ð$ð Ar!   c                 óì   — t        | j                  t        j                  «      r| j                  j                  S t        | j                  t        j
                  «      r| j                  j                  S y)z‚
        Returns either the :tl:`WebDocument` content for
        normal results or the :tl:`Document` for media results.
        N)r-   r   r   r.   Úcontentr2   r   r$   s    r   r   zInlineResult.document^   sR   € ô �d—k‘k¤5×#8Ñ#8Ô9Ø—;‘;×&Ñ&Ð&Ü˜Ÿ™¤U×%?Ñ%?Ô@Ø—;‘;×'Ñ'Ð'ð Ar!   c              ƒ   óP  K  — |r$| j                   j                  |«      ƒ d{  –—† }n$| j                  r| j                  }nt        d«      ‚|r(| j                   j	                  ||«      ƒ d{  –—† \  }}n|€dnt        j                  |«      }t        j                  j                  || j                  | j                  j                  |||||€dnt        j                  |«      ¬«      }	| j                   j                  |	| j                  |	«      ƒ d{  –—† |«      S 7 Œü7 Œ³7 Œ­w)aŒ  
        Clicks this result and sends the associated `message`.

        Args:
            entity (`entity`):
                The entity to which the message of this result should be sent.

            reply_to (`int` | `Message <telethon.tl.custom.message.Message>`, optional):
                If present, the sent message will reply to this ID or message.

            comment_to (`int` | `Message <telethon.tl.custom.message.Message>`, optional):
                Similar to ``reply_to``, but replies in the linked group of a
                broadcast channel instead (effectively leaving a "comment to"
                the specified message).

            silent (`bool`, optional):
                Whether the message should notify people with sound or not.
                Defaults to `False` (send with a notification sound unless
                the person has the chat muted). Set it to `True` to alter
                this behaviour.

            clear_draft (`bool`, optional):
                Whether the draft should be removed after sending the
                message from this result or not. Defaults to `False`.

            hide_via (`bool`, optional):
                Whether the "via @bot" should be hidden or not.
                Only works with certain bots (like @bing or @gif).

            background (`bool`, optional):
                Whether the message should be send in background.

        Nz>You must provide the entity where the result should be sent to)Úpeerr   ÚidÚsilentÚ
backgroundÚclear_draftÚhide_viaÚreply_to)r   Úget_input_entityr   Ú
ValueErrorÚ_get_comment_datar   Úget_message_idr   ÚmessagesÚSendInlineBotResultRequestr   r   r7   r   ÚInputReplyToMessageÚ_get_response_message)
r   r   r<   Ú
comment_tor8   r:   r;   r9   Úreply_idÚreqs
             r   ÚclickzInlineResult.clicki   s  è ø€ ñH ØŸ<™<×8Ñ8¸Ó@×@‰FØ�\Š\Ø—\‘\‰FäÐ]Ó^Ð^áØ%)§\¡\×%CÑ%CÀFÈJÓ%W×WÑˆF‘Hà'Ð/‘t´U×5IÑ5IÈ(Ó5SˆHä× Ñ ×;Ñ;ØØ—^‘^Ø�{‰{�~‰~ØØ!Ø#ØØ%Ð-‘T´5×3LÑ3LÈXÓ3Vð <ó 	
ˆð �|‰|×1Ñ1Ø�t—|‘| CÓ(×(¨&ó2ð 	2ð+ Aøð  Xøð )ús5   ‚!D&£D ¤A
D&Á.D"Á/B'D&ÄD$
Ä
D&Ä"D&Ä$D&c              �   óÀ   K  — | j                   s| j                  r@ | j                  j                  | j                   xs | j                  g|¢­i |¤Žƒ d{  –—† S y7 Œ­w)a  
        Downloads the media in this result (if there is a document, the
        document will be downloaded; otherwise, the photo will if present).

        This is a wrapper around `client.download_media
        <telethon.client.downloads.DownloadMethods.download_media>`.
        N)r   r
   r   Údownload_media)r   ÚargsÚkwargss      r   rJ   zInlineResult.download_media¦   s]   è ø€ ð �=Š=˜DŸJšJØ4˜Ÿ™×4Ñ4Ø—‘Ò+ §¡ð>Ø.2ò>Ø6<ñ>÷ >ð >ð 'ð>ús   ‚AAÁAÁAr   )NNNFFFN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚARTICLEÚPHOTOÚGIFÚVIDEOÚ	VIDEO_GIFÚAUDIOÚDOCUMENTÚLOCATIONÚVENUEÚCONTACTÚGAMEr    Úpropertyr#   r'   r)   r+   r/   r
   r   rH   rJ   © r!   r   r   r      sð   „ ñ	ð €GØ€EØ
€CØ€EØ€IØ€EØ€HØ€HØ€EØ€GØ€DðÀ$ô ð ñ
 ó ð
 ð ñ(ó ð(ð ñ!ó ð!ð ñ'ó ð'ð ñ#ó ð#ð ñ%ó ð%ð ñ(ó ð(ð BFØ>CØ#ó;2óz
>r!   r   N)Ú r   r   r   r   r]   r!   r   ú<module>r_      s   ðß Ý ÷k>ò k>r!   