Move ToMuchMessages to MessageError group.

This commit is contained in:
Alex Root Junior 2018-05-04 13:47:02 +03:00
parent 25a328793b
commit cd320b3cf5

View file

@ -9,6 +9,7 @@ TelegramAPIError
MessageToDeleteNotFound MessageToDeleteNotFound
MessageIdentifierNotSpecified MessageIdentifierNotSpecified
MessageTextIsEmpty MessageTextIsEmpty
ToMuchMessages
ChatNotFound ChatNotFound
InvalidQueryID InvalidQueryID
InvalidPeerID InvalidPeerID
@ -22,7 +23,6 @@ TelegramAPIError
NotFound NotFound
MethodNotKnown MethodNotKnown
PhotoAsInputFileRequired PhotoAsInputFileRequired
ToMuchMessages
InvalidStickersSet InvalidStickersSet
ChatAdminRequired ChatAdminRequired
PhotoDimensions PhotoDimensions
@ -155,6 +155,13 @@ class MessageTextIsEmpty(MessageError):
match = 'Message text is empty' 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): class ChatNotFound(BadRequest):
match = 'chat not found' match = 'chat not found'
@ -188,13 +195,6 @@ class PhotoAsInputFileRequired(BadRequest):
match = 'Photo should be uploaded as an InputFile' 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): class InvalidStickersSet(BadRequest):
match = 'STICKERSET_INVALID' match = 'STICKERSET_INVALID'
text = 'Stickers set is invalid' text = 'Stickers set is invalid'