Download Latest Version whatsapp-chatbot-python-0.9.1.zip (116.4 kB)
Email in envelope

Get an email when there's a new version of whatsapp-chatbot-python

Home / v0.9.0
Name Modified Size InfoDownloads / 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 to False
  • 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"])
Source: README.md, updated 2024-02-07