mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
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:
10
README.md
10
README.md
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user