From 5de9c9853e3af4611c59d144db858d76ea4ce5f3 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sun, 5 Apr 2020 18:28:59 +0300 Subject: [PATCH] #270: Add new exception --- aiogram/utils/exceptions.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aiogram/utils/exceptions.py b/aiogram/utils/exceptions.py index bec48d97..cee2820a 100644 --- a/aiogram/utils/exceptions.py +++ b/aiogram/utils/exceptions.py @@ -272,6 +272,10 @@ class PollQuestionLengthTooLong(PollSizeError): match = "poll question length must not exceed 255" +class PollCanBeRequestedInPrivateChatsOnly(PollError): + match = "Poll can be requested in private chats only" + + class MessageWithPollNotFound(PollError, MessageError): """ Will be raised when you try to stop poll with message without poll