From cd320b3cf55458f022241721d6ef07b8cf3f9023 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Fri, 4 May 2018 13:47:02 +0300 Subject: [PATCH] Move ToMuchMessages to MessageError group. --- aiogram/utils/exceptions.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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'