U
    ;g'                     @   sD   d dl Z d dlZd dlmZ d dlmZ e eZG dd dZdS )    N)raw)typesc                   @   s   e Zd ZdeddddZdS )RecoverPasswordzpyrogram.Clientz
types.User)selfrecovery_codereturnc                    sT   |  tjjj|dI dH }| j|jjI dH  | j	dI dH  t
j| |jS )a  Recover your password with a recovery code and log in.

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

        Parameters:
            recovery_code (``str``):
                The recovery code sent via email.

        Returns:
            :obj:`~pyrogram.types.User`: On success, the authorized user is returned and the Two-Step Verification
            password reset.

        Raises:
            BadRequest: In case the recovery code is invalid.
        )codeNF)Zinvoker   Z	functionsauthr   ZstorageZuser_iduseridZis_botr   ZUser_parse)r   r   r r   f/opt/bot/vods_filmes/script/venv/lib/python3.8/site-packages/pyrogram/methods/auth/recover_password.pyrecover_password   s    
z RecoverPassword.recover_passwordN)__name__
__module____qualname__strr   r   r   r   r   r      s   r   )loggingZpyrogramr   r   	getLoggerr   logr   r   r   r   r   <module>   s
   
