support for custom queries + presence update handler

This commit is contained in:
Adhiraj
2020-04-17 18:34:36 +05:30
parent 9ea4b0b381
commit 2cd560c430
5 changed files with 20 additions and 1 deletions

View File

@@ -27,6 +27,9 @@ Baileys is super easy to use:
``` javascript
client.handlers.onError = (error) => { /* called when there was an error */ }
```
``` javascript
client.handlers.presenceUpdated = (id, presence) => { /* called when you recieve an update on someone's presence */ }
```
``` javascript
client.handlers.onDisconnect = () => { /* called when internet gets disconnected */ }
```
@@ -133,7 +136,7 @@ Baileys is super easy to use:
}
})
```
Of course, replace ``` [countrycode][some10digitnumber] ``` with an actual country code & number. ``` isOnWhatsApp ``` returns a promise.
Of course, replace ``` [countrycode][some10digitnumber] ``` with an actual country code & number.
Do check out & run [example.js](example/example.js) to see example usage of all these functions.