U
    ;g%                     @   s>   d dl mZ d dlZd dlmZ d dlmZ G dd dZdS )    )UnionN)raw)UnknownErrorc                   @   s.   e Zd Zddeeef eeeedddZdS )GetInlineBotResults Nzpyrogram.Client)selfbotqueryoffsetlatitude	longitudec                    s   zX|  tjjj| |I dH tj |||dk	rH|dk	rHtjj||dnddI dH W S  t	k
r } z,|j
jdkr|j
jdkrtddn|W 5 d}~X Y nX dS )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)Zlatlong)r   Zpeerr	   r
   Z	geo_pointi	Timeoutz$The inline bot didn't answer in time)Zinvoker   Z	functionsmessagesr   Zresolve_peertypesZInputPeerSelfZInputGeoPointr   valueZ
error_codeerror_messageTimeoutError)r   r   r	   r
   r   r   e r   l/opt/bot/vods_filmes/script/venv/lib/python3.8/site-packages/pyrogram/methods/bots/get_inline_bot_results.pyget_inline_bot_results   s*    /z*GetInlineBotResults.get_inline_bot_results)r   r   NN)__name__
__module____qualname__r   intstrfloatr   r   r   r   r   r      s       
r   )typingr   Zpyrogramr   Zpyrogram.errorsr   r   r   r   r   r   <module>   s   