diff --git a/aiogram/utils/exceptions.py b/aiogram/utils/exceptions.py index f77fe257..bec48d97 100644 --- a/aiogram/utils/exceptions.py +++ b/aiogram/utils/exceptions.py @@ -65,6 +65,7 @@ - UnsupportedUrlProtocol - CantParseEntities - ResultIdDuplicate + - MethodIsNotAvailable - ConflictError - TerminatedByOtherGetUpdates - CantGetUpdates @@ -461,6 +462,10 @@ class BotDomainInvalid(BadRequest): text = 'Invalid bot domain' +class MethodIsNotAvailable(BadRequest): + match = "Method is available only for supergroups" + + class NotFound(TelegramAPIError, _MatchErrorMixin): __group = True