
    N[i%                     D    d dl mZ d dlZd dlmZ d dlmZ  G d d      Zy)    )UnionN)raw)UnknownErrorc                   @    e Zd Z	 	 	 	 d
dddeeef   dedededefd	Zy)GetInlineBotResultsNselfzpyrogram.Clientbotqueryoffsetlatitude	longitudec                   K   	 | j                  t        j                  j                  j	                  | j                  |       d{   t        j                  j                         |||#|!t        j                  j                  ||      nd             d{   S 7 Z7 # t        $ rE}|j                  j                  dk(  r%|j                  j                  dk(  rt        d      d|d}~ww xY ww)a  Get bot results via inline queries.
        You can then send a result using :meth:`~pyrogram.Client.send_inline_bot_result`

        .. include:: /_includes/usable-by/users.rst

        Parameters:
            bot (``int`` | ``str``):
                Unique identifier of the inline bot you want to get results from. You can specify
                a @username (str) or a bot ID (int).

            query (``str``, *optional*):
                Text of the query (up to 512 characters).
                Defaults to "" (empty string).

            offset (``str``, *optional*):
                Offset of the results to be returned.

            latitude (``float``, *optional*):
                Latitude of the location.
                Useful for location-based results only.

            longitude (``float``, *optional*):
                Longitude of the location.
                Useful for location-based results only.

        Returns:
            :obj:`BotResults <pyrogram.api.types.messages.BotResults>`: On Success.

        Raises:
            TimeoutError: In case the bot fails to answer within 10 seconds.

        Example:
            .. code-block:: python

                results = await app.get_inline_bot_results("pyrogrambot")
                print(results)
        N)latlong)r	   peerr
   r   	geo_pointi	Timeoutz$The inline bot didn't answer in time)invoker   	functionsmessagesr   resolve_peertypesInputPeerSelfInputGeoPointr   value
error_codeerror_messageTimeoutError)r   r	   r
   r   r   r   es          _/var/www/files/kim/lib/python3.12/site-packages/pyrogram/methods/bots/get_inline_bot_results.pyget_inline_bot_resultsz*GetInlineBotResults.get_inline_bot_results   s     ^	&&::"//44002! #.93H "ii55$& 6  PT ; 	  4  	ww!!T)agg.C.Cy.P"#IJPTT	sO   C6AB% B!AB% B#B%  C6!B% #B% %	C3.A C..C33C6) r"   NN)__name__
__module____qualname__r   intstrfloatr!        r    r   r      s\     AA38_A A 	A
 A Ar*   r   )typingr   pyrogramr   pyrogram.errorsr   r   r)   r*   r    <module>r.      s   &    (B Br*   