CantRestrictSelf exception

Exception CantRestrictSelf happens if admin try to restrict self
This commit is contained in:
Oleg A 2018-05-26 01:13:04 +03:00 committed by GitHub
parent 5beaf866be
commit 693571f275
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,6 +26,7 @@ TelegramAPIError
PhotoAsInputFileRequired
InvalidStickersSet
ChatAdminRequired
CantRestrictSelf
PhotoDimensions
UnavailableMembers
TypeOfFileMismatch
@ -206,7 +207,12 @@ class ChatAdminRequired(BadRequest):
match = 'CHAT_ADMIN_REQUIRED'
text = 'Admin permissions is required!'
class CantRestrictSelf(BadRequest):
match = "can't restrict self"
text = "Admin can't restrict self."
class PhotoDimensions(BadRequest):
match = 'PHOTO_INVALID_DIMENSIONS'
text = 'Invalid photo dimensions'