Ë
    :É„jˆ  ã                   óp   — d dl Z d dlZd dlmZ d dlmZ d dlmZ  e j                  e«      Z	 G d„ d«      Z
y)é    N)Úraw)ÚTLObject)ÚSessionc                   óX   — e Zd Zej                  ej
                  dfdddedededef
d„Z	y)	ÚInvokeNÚselfzpyrogram.ClientÚqueryÚretriesÚtimeoutÚsleep_thresholdc              ƒ   ó  K  — | j                   st        d«      ‚| j                  r t        j                  j                  |¬«      }| j                  r+t        j                  j                  | j                  |¬«      }| j                  j                  ||||�|n| j                  «      ƒ d{  –—† }| j                  t        |dg «      «      ƒ d{  –—†  | j                  t        |dg «      «      ƒ d{  –—†  |S 7 ŒN7 Œ,7 Œ
­w)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 <pyrogram.api.functions>` package and may accept compound
        data types from :obj:`types <pyrogram.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 <pyrogram.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         úW/var/www/html/GAP/venv/lib/python3.12/site-packages/pyrogram/methods/advanced/invoke.pyr   zInvoke.invoke   så   è ø€ ðP × Ò Ü!Ð"CÓDÐDà�?Š?Ü—M‘M×6Ñ6¸UÐ6ÓCˆEà�?Š?Ü—M‘M×3Ñ3¸t¿¹ÐV[Ð3Ó\ˆEà—,‘,×%Ñ%Ø�7˜GàÐ+ñ à×&Ñ&ó	
÷ 
ˆð ×Ñœw q¨'°2Ó6Ó7×7Ð7Ø×Ñœw q¨'°2Ó6Ó7×7Ð7àˆð
øð 	8øØ7ús6   ‚B*DÂ,C;Â-#DÃC=Ã#DÃ4C?Ã5DÃ=DÃ?D)
Ú__name__Ú
__module__Ú__qualname__r   ÚMAX_RETRIESÚWAIT_TIMEOUTr   ÚintÚfloatr   © ó    r   r   r      sL   „ ð ×*Ñ*Ø ×-Ñ-Ø!%ñ;Øð;àð;ð ð;ð ð	;ð
 ô;r%   r   )ÚloggingÚpyrogramr   Úpyrogram.raw.corer   Úpyrogram.sessionr   Ú	getLoggerr   Úlogr   r$   r%   r   ú<module>r,      s2   ðó( ã Ý Ý &Ý $à€g×Ñ˜Ó!€÷<ò <r%   