From cd40f4a949d4444c1b452806ad20916147e5c15b Mon Sep 17 00:00:00 2001 From: xkdnyan Date: Wed, 6 Sep 2017 00:06:35 +0900 Subject: [PATCH] Add RPCError for MESSAGE_NOT_MODIFIED (#231) --- telethon/errors/rpc_errors_400.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/telethon/errors/rpc_errors_400.py b/telethon/errors/rpc_errors_400.py index d55e0053..32591bb5 100644 --- a/telethon/errors/rpc_errors_400.py +++ b/telethon/errors/rpc_errors_400.py @@ -167,6 +167,14 @@ class MessageTooLongError(BadRequestError): ) +class MessageNotModifiedError(BadRequestError): + def __init__(self, **kwargs): + super(Exception, self).__init__( + self, + 'Content of the message was not modified.' + ) + + class MsgWaitFailedError(BadRequestError): def __init__(self, **kwargs): super(Exception, self).__init__( @@ -349,6 +357,7 @@ rpc_errors_400_all = { 'MESSAGE_EMPTY': MessageEmptyError, 'MESSAGE_ID_INVALID': MessageIdInvalidError, 'MESSAGE_TOO_LONG': MessageTooLongError, + 'MESSAGE_NOT_MODIFIED': MessageNotModifiedError, 'MSG_WAIT_FAILED': MsgWaitFailedError, 'PASSWORD_HASH_INVALID': PasswordHashInvalidError, 'PEER_ID_INVALID': PeerIdInvalidError,