Skip to content

1.17.0

Compare
Choose a tag to compare
@david-lev david-lev released this 30 Apr 01:11
· 154 commits to master since this release

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 pass CallbackData subclasses totracker param
  • [client,api] adding update_conversational_automation and get_business_phone_number to add and get commands, ice_breakers and enable ChatOpened events
  • [filters] adding send_to_me filters shortcut and replays_to filters. mark as deprecated all match-specific-type filters and create generic matches, regex filters for all text containing updates
  • [flows] adding updated_at to FlowDetails
  • [message] fix from_user in system messages
  • [errors] adding optionals error_subcode and type 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