ADD Exceptions:

* CantRestrictChatOwner
* UserIsAnAdministratorOfTheChat
This commit is contained in:
AndrewKing 2021-02-21 18:14:29 +02:00
parent 9de257efec
commit 3ee2d7e390
No known key found for this signature in database
GPG key ID: D332A306AAA27181

View file

@ -494,6 +494,20 @@ class MethodIsNotAvailable(BadRequest):
match = "Method is available only for supergroups"
class CantRestrictChatOwner(BadRequest):
"""
Raises when bot restricts the chat owner
"""
match = 'Can\'t remove chat owner'
class UserIsAnAdministratorOfTheChat(BadRequest):
"""
Raises when bot restricts the chat admin
"""
match = 'User is an administrator of the chat'
class NotFound(TelegramAPIError, _MatchErrorMixin):
__group = True