mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Implemented polls [From test API]
This commit is contained in:
parent
2a6f36b19b
commit
e2e2d9c9fe
10 changed files with 107 additions and 7 deletions
|
|
@ -7,12 +7,16 @@ TelegramAPIError
|
|||
MessageNotModified
|
||||
MessageToForwardNotFound
|
||||
MessageToDeleteNotFound
|
||||
MessageWithPollNotFound
|
||||
MessageIsNotAPoll
|
||||
MessageIdentifierNotSpecified
|
||||
MessageTextIsEmpty
|
||||
MessageCantBeEdited
|
||||
MessageCantBeDeleted
|
||||
MessageToEditNotFound
|
||||
ToMuchMessages
|
||||
PollCantBeStopped
|
||||
PollHasAlreadyClosed
|
||||
ObjectExpectedAsReplyMarkup
|
||||
InlineKeyboardExpected
|
||||
ChatNotFound
|
||||
|
|
@ -164,6 +168,20 @@ class MessageToDeleteNotFound(MessageError):
|
|||
match = 'message to delete not found'
|
||||
|
||||
|
||||
class MessageWithPollNotFound(MessageError):
|
||||
"""
|
||||
Will be raised when you try to stop poll with message without poll
|
||||
"""
|
||||
match = 'message with poll to stop not found'
|
||||
|
||||
|
||||
class MessageIsNotAPoll(MessageError):
|
||||
"""
|
||||
Will be raised when you try to stop poll with message without poll
|
||||
"""
|
||||
match = 'message is not a poll'
|
||||
|
||||
|
||||
class MessageIdentifierNotSpecified(MessageError):
|
||||
match = 'message identifier is not specified'
|
||||
|
||||
|
|
@ -203,6 +221,14 @@ class InlineKeyboardExpected(BadRequest):
|
|||
match = 'inline keyboard expected'
|
||||
|
||||
|
||||
class PollCantBeStopped(BadRequest):
|
||||
match = "poll can't be stopped"
|
||||
|
||||
|
||||
class PollHasAlreadyBeenClosed(BadRequest):
|
||||
match = 'poll has already been closed'
|
||||
|
||||
|
||||
class ChatNotFound(BadRequest):
|
||||
match = 'chat not found'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue