This library helps you easily create a Python chatbot with WhatsApp API.
OTHER License
Bot releases are hidden (Show)
Published by Amele9 9 months ago
raise_errors
option has been changed to False
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"])
Published by Amele9 11 months ago
Added FAQ
Added logger
Added debug mode
In debug mode you can see data received from whatsapp-api-client-python
.
bot = GreenAPIBot("", "", debug_mode=True)
Added raise_errors
option
If the option is enabled, it will be raised when an error is received. Enabled by default
bot = GreenAPIBot("", "", raise_errors=True)
Added bot debug mode
In the bot debug mode you can see all actions with the received data and their handling.
bot = GreenAPIBot("", "", bot_debug_mode=True)
Published by Amele9 about 1 year ago
@bot.router.message(regexp=("message", re.IGNORECASE))
def message_handler(notification: Notification) -> None:
print(notification.event)
Published by Amele9 about 1 year ago
settings
(is used to set up instance settings)delete_notifications_at_startup
(is used to delete old incoming notifications)Published by Amele9 over 1 year ago
TEXT_TYPES
)Notification.get_message_text
method (@SomedayIsTheDay)Published by Amele9 over 1 year ago
Published by Amele9 over 1 year ago
Published by Amele9 over 1 year ago
Published by Amele9 over 1 year ago
Published by Amele9 over 1 year ago
Published by Amele9 over 1 year ago
Published by Amele9 over 1 year ago
Published by Amele9 over 1 year ago
Published by Amele9 over 1 year ago
Published by Amele9 over 1 year ago