@zervonexx/baileys 5.0.1 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/WAProto/WAProto.json +1 -0
- package/WAProto/WAProto.proto +7160 -0
- package/WAProto/WAProtoCompile.js +1 -59
- package/WAProto/index.js +36 -76
- package/lib/Defaults/index.js +3 -2
- package/lib/Socket/index.js +3 -0
- package/lib/Utils/business.js +1 -1
- package/lib/Utils/generics.js +7 -6
- package/lib/Utils/logger.js +2 -1
- package/lib/Utils/messages-media.js +1 -1
- package/lib/Utils/messages.js +4 -2
- package/lib/index.js +1 -1
- package/package.json +1 -5
- package/WAProto/fetcher.js +0 -68
- package/WAProto/parser.js +0 -334
package/README.md
CHANGED
|
@@ -857,6 +857,16 @@ await sock.sendMessage(jid, { sticker: { url: './sticker.webp' } })
|
|
|
857
857
|
|
|
858
858
|
// Premium sticker
|
|
859
859
|
await sock.sendMessage(jid, { sticker: buffer, premium: 1 })
|
|
860
|
+
|
|
861
|
+
// Sticker with audio — accepts any format (buffer, url, path)
|
|
862
|
+
await sock.sendMessage(jid, { sticker: buffer, audio: './sound.mp3' })
|
|
863
|
+
await sock.sendMessage(jid, { sticker: { url: './sticker.webp' }, audio: { url: 'https://example.com/sound.ogg' } })
|
|
864
|
+
await sock.sendMessage(jid, { sticker: buffer, audio: buffer })
|
|
865
|
+
|
|
866
|
+
// Pass a pre-resolved audioMessage proto directly
|
|
867
|
+
await sock.sendMessage(jid, { sticker: buffer, audioMessage: resolvedAudioMessageObject })
|
|
868
|
+
|
|
869
|
+
// ⚠️ Audio attachment is not supported for sticker packs — only individual stickers
|
|
860
870
|
```
|
|
861
871
|
|
|
862
872
|
</details>
|
|
@@ -2291,6 +2301,8 @@ await sock.sendMessage(jid, {
|
|
|
2291
2301
|
<details>
|
|
2292
2302
|
<summary><strong>Show sticker pack examples</strong></summary>
|
|
2293
2303
|
|
|
2304
|
+
> ⚠️ Sticker audio (`audio` / `audioMessage`) is not supported for sticker packs. It only works on individual sticker messages.
|
|
2305
|
+
|
|
2294
2306
|
Send a full sticker pack. Supports buffers, file paths, and URLs. Packs over 60 stickers are automatically batched with a 2-second delay between batches.
|
|
2295
2307
|
|
|
2296
2308
|
```javascript
|