o
    -˜Žj‡	  ã                   @   s8   d dl Z d dlZd dlmZ e  e¡ZG dd„ dƒZdS )é    N)Úrawc                   @   s   e Zd Z		ddd„ZdS )ÚStartÚselfúpyrogram.Clientc              	   Ã   sÄ   �|   ¡ I dH }z7|s|  ¡ I dH  | j ¡ I dH s2| jr2|  tjj 	¡ ¡I dH j
| _t d| j¡ |  tjj ¡ ¡I dH  W n ttfyP   |  ¡ I dH  ‚ w |  ¡ I dH | _|  ¡ I dH  | S )aÃ  Start the client.

        This method connects the client to Telegram and, in case of new sessions, automatically manages the
        authorization process using an interactive prompt.

        Returns:
            :obj:`~pyrogram.Client`: The started client itself.

        Raises:
            ConnectionError: In case you try to start an already started client.

        Example:
            .. code-block:: python

                from pyrogram import Client

                app = Client("my_account")


                async def main():
                    await app.start()
                    ...  # Invoke API methods
                    await app.stop()


                app.run(main())
        NzTakeout session %s initiated)ÚconnectÚ	authorizeÚstorageÚis_botÚtakeoutÚinvoker   Ú	functionsÚaccountÚInitTakeoutSessionÚidÚ
takeout_idÚlogÚinfoÚupdatesÚGetStateÚ	ExceptionÚKeyboardInterruptÚ
disconnectÚget_meÚmeÚ
initialize)r   Úis_authorized© r   ú]/var/www/kodo/Anonymous/send/lib/python3.10/site-packages/pyrogram/methods/utilities/start.pyÚstart   s    €þzStart.startN)r   r   )Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r      s    ÿr   )ÚloggingÚpyrogramr   Ú	getLoggerr   r   r   r   r   r   r   Ú<module>   s
   
