new: add exceptions (#427)

* new: add FileIsTooBig exception

* new: add MessageCantBeForwarded exception
This commit is contained in:
Ramzan Bekbulatov 2020-09-26 15:22:23 +03:00 committed by GitHub
parent 7b33e5c68a
commit 41c104bb57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,6 +12,7 @@
- MessageTextIsEmpty
- MessageCantBeEdited
- MessageCantBeDeleted
- MessageCantBeForwarded
- MessageToEditNotFound
- MessageToReplyNotFound
- ToMuchMessages
@ -38,6 +39,7 @@
- URLHostIsEmpty
- StartParamInvalid
- ButtonDataInvalid
- FileIsTooBig
- WrongFileIdentifier
- GroupDeactivated
- BadWebhook
@ -213,6 +215,10 @@ class MessageCantBeDeleted(MessageError):
match = 'message can\'t be deleted'
class MessageCantBeForwarded(MessageError):
match = 'message can\'t be forwarded'
class MessageToEditNotFound(MessageError):
match = 'message to edit not found'
@ -347,6 +353,10 @@ class ButtonDataInvalid(BadRequest):
text = 'Button data invalid'
class FileIsTooBig(BadRequest):
match = 'File is too big'
class WrongFileIdentifier(BadRequest):
match = 'wrong file identifier/HTTP URL specified'