Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
README.md | 2024-02-07 | 922 Bytes | |
whatsapp-chatbot-python-0.9.0.tar.gz | 2024-02-07 | 105.1 kB | |
whatsapp-chatbot-python-0.9.0.zip | 2024-02-07 | 116.2 kB | |
Totals: 3 Items | 222.2 kB | 0 |
Important changes
- The default value for the
raise_errors
option 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"])