mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Update README.md
This commit is contained in:
13
README.md
13
README.md
@@ -172,12 +172,11 @@ To note:
|
||||
|
||||
## Sending Read Receipts
|
||||
``` ts
|
||||
client.sendReadReceipt(id, messageID)
|
||||
```
|
||||
const id = '1234-123@g.us'
|
||||
const messageID = 'AHASHH123123AHGA' // id of the message you want to read
|
||||
await client.sendReadReceipt(id, messageID) // mark as read
|
||||
|
||||
Also, to mark a chat unread:
|
||||
``` ts
|
||||
client.markChatUnread(id)
|
||||
await client.markChatUnread(id) // to mark chat as unread
|
||||
```
|
||||
|
||||
`id` is in the same format as mentioned earlier. The message ID is the unique identifier of the message that you are marking as read. On a `WAMessage`, it can be accessed using ```messageID = message.key.id```.
|
||||
@@ -218,10 +217,8 @@ If you want to save & process some images, videos, documents or stickers you rec
|
||||
const jid = '1234@s.whatsapp.net' // can also be a group
|
||||
const response = await client.sendMessage (jid, 'hello!', MessageType.text) // send a message
|
||||
await client.deleteMessage (jid, {id: response.messageID, remoteJid: jid, fromMe: true}) // will delete the sent message!
|
||||
```
|
||||
|
||||
You can also archive a chat using:
|
||||
``` ts
|
||||
// You can also archive a chat using:
|
||||
await client.archiveChat(jid)
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user