U
    ç;ãg<	  ã                   @   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d„ZdS )ÚStartzpyrogram.Client)Úselfc              	   Ã   sÌ   |   ¡ I dH }zn|s"|  ¡ I dH  | j ¡ I dH sb| jrb|  tjj 	¡ ¡I dH j
| _t d| j¡ |  tjj ¡ ¡I dH  W n( ttfk
r¤   |  ¡ I dH  ‚ Y n$X |  ¡ I dH | _|  ¡ I dH  | S d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)ÚconnectZ	authorizeZstorageZis_botZtakeoutZinvoker   Z	functionsÚaccountZInitTakeoutSessionÚidZ
takeout_idÚlogÚinfoZupdatesZGetStateÚ	ExceptionÚKeyboardInterruptZ
disconnectZget_meÚmeZ
initialize)r   Zis_authorized© r   ú`/opt/bot/vods_filmes/script/venv/lib/python3.8/site-packages/pyrogram/methods/utilities/start.pyÚstart   s    zStart.startN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r      s   ÿr   )ÚloggingZpyrogramr   Ú	getLoggerr   r   r   r   r   r   r   Ú<module>   s   
