diff --git a/aiogram/utils/exceptions.py b/aiogram/utils/exceptions.py index 015720c7..7aed8e54 100644 --- a/aiogram/utils/exceptions.py +++ b/aiogram/utils/exceptions.py @@ -9,6 +9,7 @@ TelegramAPIError MessageToDeleteNotFound MessageIdentifierNotSpecified MessageTextIsEmpty + ToMuchMessages ChatNotFound InvalidQueryID InvalidPeerID @@ -22,7 +23,6 @@ TelegramAPIError NotFound MethodNotKnown PhotoAsInputFileRequired - ToMuchMessages InvalidStickersSet ChatAdminRequired PhotoDimensions @@ -155,6 +155,13 @@ class MessageTextIsEmpty(MessageError): match = 'Message text is empty' +class ToMuchMessages(MessageError): + """ + Will be raised when you try to send media group with more than 10 items. + """ + match = 'Too much messages to send as an album' + + class ChatNotFound(BadRequest): match = 'chat not found' @@ -188,13 +195,6 @@ class PhotoAsInputFileRequired(BadRequest): match = 'Photo should be uploaded as an InputFile' -class ToMuchMessages(BadRequest): - """ - Will be raised when you try to send media group with more than 10 items. - """ - match = 'Too much messages to send as an album' - - class InvalidStickersSet(BadRequest): match = 'STICKERSET_INVALID' text = 'Stickers set is invalid'