mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-15 03:08:51 +00:00
CantRestrictSelf exception
Exception CantRestrictSelf happens if admin try to restrict self
This commit is contained in:
parent
5beaf866be
commit
693571f275
1 changed files with 6 additions and 0 deletions
|
|
@ -26,6 +26,7 @@ TelegramAPIError
|
||||||
PhotoAsInputFileRequired
|
PhotoAsInputFileRequired
|
||||||
InvalidStickersSet
|
InvalidStickersSet
|
||||||
ChatAdminRequired
|
ChatAdminRequired
|
||||||
|
CantRestrictSelf
|
||||||
PhotoDimensions
|
PhotoDimensions
|
||||||
UnavailableMembers
|
UnavailableMembers
|
||||||
TypeOfFileMismatch
|
TypeOfFileMismatch
|
||||||
|
|
@ -207,6 +208,11 @@ class ChatAdminRequired(BadRequest):
|
||||||
text = 'Admin permissions is required!'
|
text = 'Admin permissions is required!'
|
||||||
|
|
||||||
|
|
||||||
|
class CantRestrictSelf(BadRequest):
|
||||||
|
match = "can't restrict self"
|
||||||
|
text = "Admin can't restrict self."
|
||||||
|
|
||||||
|
|
||||||
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