open-wa / wa-automate-docker

💬 🤖 The easiest way to turn your WhatsApp into an API. Be sure to 🌟 this repository for updates!
111 stars 32 forks source link

Unread Messages - How to ? #33

Closed fire17 closed 2 years ago

fire17 commented 2 years ago

Hi there! just got to first use this docker version of openwa looks really cool

can someone please help explain how do i subscribe to new messages? something like subscribing to onMessage or getting unreadMessages

also, after I log in, how do I save my session

thank you very much :pray:

smashah commented 2 years ago

@fire17 docker run open-wa/wa-automate is a drop in replacement for npx @open-wa/wa-automate so you can use it exactly the same.

Use --help to see all the options/flags.

You can set a webhook to send all events to with --webhook https://webhook.address

Or if you are planning on coding your bot in node, you can use --socket then use the socket client to easily decouple your session from your process during development and production. The SocketClient has the same API as the Client in the main node project.

https://github.com/open-wa/wa-automate-socket-client-nodejs

How are you planning on implementing open wa?

p.s there will be a python version of the socket very soon.

fire17 commented 2 years ago

thx 💜🙏 I'm getting messages

just need to understand how to save sessions