mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
feat: link previews on MD
This commit is contained in:
11
README.md
11
README.md
@@ -413,6 +413,17 @@ const reactionMessage = {
|
||||
const sendMsg = await sock.sendMessage(id, reactionMessage)
|
||||
```
|
||||
|
||||
### Sending messages with link previews
|
||||
|
||||
1. By default, WA MD does not seem to have link generation when sent from the web
|
||||
2. Baileys has an extra function to help generate the content for these link previews
|
||||
3. To enable this function's usage, add `link-preview-js` as a dependency to your project with `yarn add link-preview-js`
|
||||
4. Send a link:
|
||||
``` ts
|
||||
// send a link
|
||||
const sentMsg = await sock.sendMessage(id, { text: 'Hi, this was sent using https://github.com/adiwajshing/baileys' })
|
||||
```
|
||||
|
||||
### Media Messages
|
||||
|
||||
Sending media (video, stickers, images) is easier & more efficient than ever.
|
||||
|
||||
Reference in New Issue
Block a user