mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
ADD Exceptions: (#512)
* CantRestrictChatOwner * UserIsAnAdministratorOfTheChat
This commit is contained in:
parent
5254329c2b
commit
9bb3a5dccf
1 changed files with 14 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue