diff --git a/aiogram/utils/exceptions.py b/aiogram/utils/exceptions.py index cee2820a..a289be25 100644 --- a/aiogram/utils/exceptions.py +++ b/aiogram/utils/exceptions.py @@ -7,6 +7,7 @@ - MessageNotModified - MessageToForwardNotFound - MessageToDeleteNotFound + - MessageToPinNotFound - MessageIdentifierNotSpecified - MessageTextIsEmpty - MessageCantBeEdited @@ -182,6 +183,13 @@ class MessageToDeleteNotFound(MessageError): match = 'message to delete not found' +class MessageToPinNotFound(MessageError): + """ + Will be raised when you try to pin deleted or unknown message. + """ + match = 'message to pin not found' + + class MessageToReplyNotFound(MessageError): """ Will be raised when you try to reply to very old or deleted or unknown message.