mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-11 09:55:21 +00:00
More exceptions.
This commit is contained in:
parent
b61892e875
commit
c0525a9d50
1 changed files with 10 additions and 0 deletions
|
|
@ -16,6 +16,7 @@ TelegramAPIError
|
||||||
ObjectExpectedAsReplyMarkup
|
ObjectExpectedAsReplyMarkup
|
||||||
InlineKeyboardExpected
|
InlineKeyboardExpected
|
||||||
ChatNotFound
|
ChatNotFound
|
||||||
|
ChatIdIsEmpty
|
||||||
ChatDescriptionIsNotModified
|
ChatDescriptionIsNotModified
|
||||||
InvalidQueryID
|
InvalidQueryID
|
||||||
InvalidPeerID
|
InvalidPeerID
|
||||||
|
|
@ -40,6 +41,7 @@ TelegramAPIError
|
||||||
NotEnoughRightsToPinMessage
|
NotEnoughRightsToPinMessage
|
||||||
CantDemoteChatCreator
|
CantDemoteChatCreator
|
||||||
CantRestrictSelf
|
CantRestrictSelf
|
||||||
|
NotEnoughRightsToRestrict
|
||||||
PhotoDimensions
|
PhotoDimensions
|
||||||
UnavailableMembers
|
UnavailableMembers
|
||||||
TypeOfFileMismatch
|
TypeOfFileMismatch
|
||||||
|
|
@ -205,6 +207,10 @@ class ChatNotFound(BadRequest):
|
||||||
match = 'chat not found'
|
match = 'chat not found'
|
||||||
|
|
||||||
|
|
||||||
|
class ChatIdIsEmpty(BadRequest):
|
||||||
|
match = 'chat_id is empty'
|
||||||
|
|
||||||
|
|
||||||
class ChatDescriptionIsNotModified(BadRequest):
|
class ChatDescriptionIsNotModified(BadRequest):
|
||||||
match = 'chat description is not modified'
|
match = 'chat description is not modified'
|
||||||
|
|
||||||
|
|
@ -284,6 +290,10 @@ class CantRestrictSelf(BadRequest):
|
||||||
text = "Admin can't restrict self."
|
text = "Admin can't restrict self."
|
||||||
|
|
||||||
|
|
||||||
|
class NotEnoughRightsToRestrict(BadRequest):
|
||||||
|
match = 'not enough rights to restrict/unrestrict chat member'
|
||||||
|
|
||||||
|
|
||||||
class PhotoDimensions(BadRequest):
|
class PhotoDimensions(BadRequest):
|
||||||
match = 'PHOTO_INVALID_DIMENSIONS'
|
match = 'PHOTO_INVALID_DIMENSIONS'
|
||||||
text = 'Invalid photo dimensions'
|
text = 'Invalid photo dimensions'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue