From 8a149b1ed5fd8458dc1a5b60d198e3d7214735bf Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Wed, 2 May 2018 18:09:01 +0300 Subject: [PATCH] Add error: MessageTextIsEmpty --- aiogram/utils/exceptions.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/aiogram/utils/exceptions.py b/aiogram/utils/exceptions.py index 99b174a1..cbefa859 100644 --- a/aiogram/utils/exceptions.py +++ b/aiogram/utils/exceptions.py @@ -8,6 +8,7 @@ TelegramAPIError MessageToForwardNotFound MessageToDeleteNotFound MessageIdentifierNotSpecified + MessageTextIsEmpty ChatNotFound InvalidQueryID InvalidPeerID @@ -151,7 +152,11 @@ class MessageIdentifierNotSpecified(MessageError): match = 'message identifier is not specified' -class ChatNotFound(BadRequest, _MatchErrorMixin): +class MessageTextIsEmpty(MessageError): + match = 'Message text is empty' + + +class ChatNotFound(BadRequest): match = 'chat not found'