From 3440ab3c96e31384cbcf515e75904dcade6f5fd0 Mon Sep 17 00:00:00 2001 From: OGURCHINSKIY <41481736+OGURCHINSKIY@users.noreply.github.com> Date: Sat, 5 Dec 2020 16:28:56 +0300 Subject: [PATCH] Add exception MessageIdInvalid (#474) --- aiogram/utils/exceptions.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/aiogram/utils/exceptions.py b/aiogram/utils/exceptions.py index cc1885dd..d38ff009 100644 --- a/aiogram/utils/exceptions.py +++ b/aiogram/utils/exceptions.py @@ -6,6 +6,7 @@ - MessageError - MessageNotModified - MessageToForwardNotFound + - MessageIdInvalid - MessageToDeleteNotFound - MessageToPinNotFound - MessageIdentifierNotSpecified @@ -178,6 +179,11 @@ class MessageToForwardNotFound(MessageError): match = 'message to forward not found' +class MessageIdInvalid(MessageError): + text = 'Invalid message id' + match = 'message_id_invalid' + + class MessageToDeleteNotFound(MessageError): """ Will be raised when you try to delete very old or deleted or unknown message.