From e2b54301cac177a7f29f43268ce4c90bde7f31ea Mon Sep 17 00:00:00 2001 From: Andrew <11490628+andrew000@users.noreply.github.com> Date: Thu, 2 Sep 2021 00:49:48 +0300 Subject: [PATCH] Add `ChatRestricted` exception `{/mail.py:67} 2021-08-30 11:49:13,333 - WARNING - [MAIL] ::: EXC(Chat_restricted) ::: MRO([, , , , , ])` --- aiogram/utils/exceptions.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aiogram/utils/exceptions.py b/aiogram/utils/exceptions.py index f2ad6111..01f3bcf6 100644 --- a/aiogram/utils/exceptions.py +++ b/aiogram/utils/exceptions.py @@ -515,6 +515,10 @@ class NoRightsToSendMessage(BadRequest): match = 'Have no rights to send a message' +class ChatRestricted(BadRequest): + match = 'Chat_restricted' + + class NotFound(TelegramAPIError, _MatchErrorMixin): __group = True