Fix ContactsArrayMessage and add getBusinessProfile (#1074)

* Fix: ContactsArrayMessage and add getBusinessProfile

* delete package-lock.json

* edit readme.md

* add bussines hours

* make type same with leagcy

* revert
This commit is contained in:
BochilGaming
2022-01-06 23:45:52 +07:00
committed by GitHub
parent 7ffa10a5c5
commit 0b5d772b08
4 changed files with 61 additions and 5 deletions

View File

@@ -582,6 +582,11 @@ await sock.sendMessage(
await sock.updateBlockStatus("xyz@s.whatsapp.net", "block") // Block user
await sock.updateBlockStatus("xyz@s.whatsapp.net", "unblock") // Unblock user
```
- To get a business profile, such as description, category
```ts
const profile = await sock.getBusinessProfile("xyz@s.whatsapp.net")
console.log("business description: " + profile.description + ", category: " + profile.category)
```
Of course, replace ``` xyz ``` with an actual ID.
## Groups
@@ -627,6 +632,11 @@ Of course, replace ``` xyz ``` with an actual ID.
const code = await sock.groupInviteCode("abcd-xyz@g.us")
console.log("group code: " + code)
```
- To revoke the invite code in a group
```ts
const code = await sock.groupRevokeInvite("abcd-xyz@g.us")
console.log("New group code: " + code)
```
- To query the metadata of a group
``` ts
const metadata = await sock.groupMetadata("abcd-xyz@g.us")