File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed
Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ def message_handler(notification: Notification) -> None:
1010 sender_data = notification .event ["senderData" ]
1111 sender_name = sender_data ["senderName" ]
1212
13- response = notification .answer_with_poll (
13+ notification .answer_with_poll (
1414 f"Hello, { sender_name } . Here's what I can do:\n \n " ,
1515 [
1616 {"optionName" : "1. Report a problem" },
@@ -20,13 +20,8 @@ def message_handler(notification: Notification) -> None:
2020 ]
2121 )
2222
23- stanza = response .data ["idMessage" ]
24-
25- bot .router .poll_update_message .add_handler_with_stanza (
26- start_poll_handler , stanza
27- )
28-
2923
24+ @bot .router .poll_update_message ()
3025def start_poll_handler (notification : Notification ) -> None :
3126 votes = notification .event ["messageData" ]["pollMessageData" ]["votes" ]
3227 for vote_data in votes :
Original file line number Diff line number Diff line change 55
66setup (
77 name = "whatsapp-chatbot-python" ,
8- version = "0.8 .0" ,
8+ version = "0.9 .0" ,
99 description = (
1010 "This library helps you easily create"
1111 " a Python chatbot with WhatsApp API."
You can’t perform that action at this time.
0 commit comments