1.17.0
What's Changed
Update with pip:
pip3 install -U pywa
- [client,message_status] Added param
tracker
to all send-message-methods in order to track the message status, allowing to passCallbackData
subclasses totracker
param - [client,api] adding
update_conversational_automation
andget_business_phone_number
to add and getcommands
,ice_breakers
and enableChatOpened
events - [filters] adding
send_to_me
filters shortcut andreplays_to
filters. mark as deprecated all match-specific-type filters and create genericmatches
,regex
filters for all text containing updates - [flows] adding
updated_at
toFlowDetails
- [message] fix
from_user
in system messages - [errors] adding optionals
error_subcode
andtype
to all errors - [logging] improve loggers performance
- [utils] bump graph api version to 19.0 and expose
Version
in the package level - [docs] switch readme to markdown
from pywa import WhatsApp, types, filters
wa = WhatsApp(...)
wa.send_message(
to="972123456789",
text="Hello from pywa!",
tracker="my_tracker",
)
@wa.on_message_status(filters.matches("my_tracker"))
def on_status(_: WhatsApp, status: types.MessageStatus):
print(status.tracker)
from pywa import WhatsApp
from pywa.types import Command
wa = WhatsApp(...)
wa.update_conversational_automation(
enable_chat_opened=True,
ice_breakers=[
"Generate me an image of a cute cat",
"Create a beautiful image of a sunset",
],
commands=[
Command(name="imagine", description="Create images using a text prompt"),
Command(name="contact", description="Contact us",),
]
)
Full Changelog: 1.16.2...1.17.0