Added poll support
Important changes
- The default value for the
raise_errorsoption has been changed toFalse - Now if an error is received during event handling, the bot will attempt to handle the event again after 5 seconds
Features
- Added poll support
Example of working with a poll
You can subscribe to notifications for incoming polls and incoming poll updates using the poll_message and poll_update_message decorators. Example:
@bot.router.poll_message()
def poll_message_handler(notification: Notification) -> None:
print(notification.event["messageData"]["pollMessageData"]["options"])@bot.router.poll_update_message()
def poll_update_message_handler(notification: Notification) -> None:
print(notification.event["messageData"]["pollMessageData"]["votes"])