open-wa / wa-automate-python

💬 🤖 The most advanced Python whatsapp library for chatbots with advanced features. Be sure to ⭐ this repository for updates!
Other
330 stars 71 forks source link

How to use the new ack listener?? #39

Closed Manjit2003 closed 3 years ago

Manjit2003 commented 3 years ago

@mrodal Please help me in using the new_acks listener....

mrodal commented 3 years ago

Hey @ManjitPardeshi, looks like its broken now, Im working on fixing it, and should be ready in a bit, here's an example of how to use it:

class NewMessageObserver:
    def on_ack_received(self, ev):
        print(ev)

observer = NewMessageObserver()

driver.subscribe_acks(observer)

Inside on_ack_received, ev is a list of all the new acks, which are objects with the ack code, the chat id, the message, etc: image

The ack code can be 1: Sent 2: Received 3: Read

mrodal commented 3 years ago

Please try with the latest version, 1.3.5

Manjit2003 commented 3 years ago

Thank you very much sir for your extremely fast reply.

Manjit2003 commented 3 years ago

@mrodal Eagerly looking for update

mrodal commented 3 years ago

I had published the new version to pypi, but maybe you use it directly from the repo. I have now pushed the changes to master

Manjit2003 commented 3 years ago

@mrodal sir thanks for fixing the issue this fast... closing...

erm3nda commented 3 years ago

You forgot the ack 4 for ptt messages, wich indicates "voice message has been listened".