U
    ç;ãgâ  ã                   @   s4   d dl Z d dlZd dlZe e¡ZG dd„ dƒZdS )é    Nc                   @   s   e Zd Zddœdd„ZdS )Ú
Initializezpyrogram.Client©Úselfc                 Ã   sN   | j stdƒ‚| jrtdƒ‚|  ¡  | j ¡ I dH  t |  ¡ ¡| _	d| _dS )ak  Initialize the client by starting up workers.

        This method will start updates and download workers.
        It will also load plugins and start the internal dispatcher.

        Raises:
            ConnectionError: In case you try to initialize a disconnected client or in case you try to initialize an
                already initialized client.
        z&Can't initialize a disconnected clientzClient is already initializedNT)
Zis_connectedÚConnectionErrorZis_initializedZload_pluginsÚ
dispatcherÚstartÚasyncioZcreate_taskZupdates_watchdogZupdates_watchdog_taskr   © r	   ú`/opt/bot/vods_filmes/script/venv/lib/python3.8/site-packages/pyrogram/methods/auth/initialize.pyÚ
initialize   s    zInitialize.initializeN)Ú__name__Ú
__module__Ú__qualname__r   r	   r	   r	   r
   r      s   ÿr   )r   ÚloggingZpyrogramÚ	getLoggerr   Úlogr   r	   r	   r	   r
   Ú<module>   s   
