o
    -˜Žjì  ã                   @   s¨   d Z zddlT W n	 ey   Y nw dZ ddlT ddlmZmZ G dd„ deƒZG dd„ deƒZ	G d	d
„ d
e	ƒZ
G dd„ de	ƒZg d¢Ze rLe ej¡ e ej¡ dS )Fé   )Ú*T)ÚRPCErrorÚUnknownErrorc                       s8   e Zd Zddddddddd	d
ddœZ‡ fdd„Z‡  ZS )ÚBadMsgNotificationz>The msg_id is too low, the client time has to be synchronized.z?The msg_id is too high, the client time has to be synchronized.zpIncorrect two lower order of the msg_id bits, the server expects the client message msg_id to be divisible by 4.zPThe container msg_id is the same as the msg_id of a previously received message.z<The message is too old, it cannot be verified by the server.zThe msg_seqno is too low.zThe msg_seqno is too high.z<An even msg_seqno was expected, but an odd one was received.z<An odd msg_seqno was expected, but an even one was received.zIncorrect server salt.zInvalid container.)é   é   é   é   é   é    é!   é"   é#   é0   é@   c                    s*   | j  |d¡}tƒ  d|› d|› �¡ d S )NzUnknown error codeú[z] )ÚdescriptionsÚgetÚsuperÚ__init__)ÚselfÚcodeÚdescription©Ú	__class__© úU/var/www/kodo/Anonymous/send/lib/python3.10/site-packages/pyrogram/errors/__init__.pyr   /   s   zBadMsgNotification.__init__)Ú__name__Ú
__module__Ú__qualname__r   r   Ú__classcell__r   r   r   r   r      s    ôr   c                   @   s&   e Zd ZdZededefdd„ƒZdS )ÚSecurityErrorzGeneric security error.ÚcondÚmsgc                 C   s   |s	| d|› �ƒ‚dS )z/Raises this exception if the condition is falsezCheck failed: Nr   )Úclsr"   r#   r   r   r   Úcheck7   s   ÿzSecurityError.checkN)r   r   r   Ú__doc__ÚclassmethodÚboolÚstrr%   r   r   r   r   r!   4   s    r!   c                       ó(   e Zd ZdZddef‡ fdd„Z‡  ZS )ÚSecurityCheckMismatchz-Raised when a security check mismatch occurs.Nr#   c                    ó"   t ƒ  |d u rd¡ d S |¡ d S )Nz'A security check mismatch has occurred.©r   r   ©r   r#   r   r   r   r   A   ó   "zSecurityCheckMismatch.__init__©N©r   r   r   r&   r)   r   r    r   r   r   r   r+   >   ó    r+   c                       r*   )ÚCDNFileHashMismatchz,Raised when a CDN file hash mismatch occurs.Nr#   c                    r,   )Nz&A CDN file hash mismatch has occurred.r-   r.   r   r   r   r   H   r/   zCDNFileHashMismatch.__init__r0   r1   r   r   r   r   r3   E   r2   r3   )r   r!   r+   r3   r   r   N)ÚEXCEPTION_AVAILÚ
exceptionsÚImportErrorÚpyromodÚ	rpc_errorr   r   Ú	Exceptionr   r!   r+   r3   Ú__all__Úextendr   r   r   r   Ú<module>   s"   ÿ
