
    h                        d dl mZ d dlZd dlmZ d dlZd dlmZ d dlmZ erd dl	m
Z
  ej        e          Z G d d          ZdS )	    )annotationsN)TYPE_CHECKING)raw)Session)TLObjectc                  2    e Zd Zej        ej        dfddZdS )InvokeNselfhydrogram.Clientqueryr   retriesinttimeoutfloatsleep_thresholdfloat | Nonec                  K   | j         st          d          | j        r t          j                            |          }| j        r&t          j                            | j        |          }| j        	                    |||||n| j
                   d{V }|                     t          |dg                      d{V  |                     t          |dg                      d{V  |S )a  Invoke raw Telegram functions.

        This method makes it possible to manually call every single Telegram API method in a low-level manner.
        Available functions are listed in the :obj:`functions <hydrogram.api.functions>` package and may accept compound
        data types from :obj:`types <hydrogram.api.types>` as well as bare types such as ``int``, ``str``, etc...

        .. note::

            This is a utility method intended to be used **only** when working with raw
            :obj:`functions <hydrogram.api.functions>` (i.e: a Telegram API method you wish to use which is not
            available yet in the Client class as an easy-to-use method).

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

        Parameters:
            query (``RawFunction``):
                The API Schema function filled with proper arguments.

            retries (``int``):
                Number of retries.

            timeout (``float``):
                Timeout in seconds.

            sleep_threshold (``float``):
                Sleep threshold in seconds.

        Returns:
            ``RawType``: The raw type response generated by the query.

        Raises:
            RPCError: In case of a Telegram RPC error.
        zClient has not been started yet)r   )
takeout_idr   Nuserschats)is_connectedConnectionError
no_updatesr   	functionsInvokeWithoutUpdatesr   InvokeWithTakeoutsessioninvoker   fetch_peersgetattr)r
   r   r   r   r   rs         a/var/www/html/auto_sub_bot/venv/lib/python3.11/site-packages/hydrogram/methods/advanced/invoke.pyr   zInvoke.invoke$   s'     P   	E!"CDDD? 	DM66U6CCE? 	]M33tV[3\\E,%% / ;__AU	
 
 
 
 
 
 
 
 wq'266777777777wq'266777777777    )
r
   r   r   r   r   r   r   r   r   r   )__name__
__module____qualname__r   MAX_RETRIESWAIT_TIMEOUTr    r#   r"   r	   r	   #   s>         * -(,; ; ; ; ; ; ;r#   r	   )
__future__r   loggingtypingr   	hydrogramr   hydrogram.sessionr   hydrogram.raw.corer   	getLoggerr$   logr	   r)   r#   r"   <module>r2      s   ( # " " " " "                        % % % % % % ,++++++g!!< < < < < < < < < <r#   