@zervonexx/baileys 5.0.1 → 5.0.3
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/LICENSE +1 -1
- package/README.md +14 -18
- 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/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -111,22 +111,6 @@ const sock = makeWASocket({
|
|
|
111
111
|
|
|
112
112
|
</details>
|
|
113
113
|
|
|
114
|
-
<details>
|
|
115
|
-
<summary><strong>Remote WAProto updates</strong></summary>
|
|
116
|
-
|
|
117
|
-
`WAProto/fetcher.js` fetches `wa-version.json` and `WAProto.bundle.js` from
|
|
118
|
-
`https://raw.githubusercontent.com/nexustechpro2/baileys/wa-cache` once every 24 hours
|
|
119
|
-
to keep the WhatsApp protocol buffer definitions current without requiring a package
|
|
120
|
-
update. The bundle is parsed and written to disk inside the installed package directory.
|
|
121
|
-
|
|
122
|
-
This is intentional — WhatsApp frequently changes its protocol; this mechanism keeps
|
|
123
|
-
the library functional between releases. The source branch (`wa-cache`) is controlled
|
|
124
|
-
by the package publisher ([@nexustechpro2](https://github.com/nexustechpro2)).
|
|
125
|
-
|
|
126
|
-
If you require fully static, air-gapped installs, this package is not suitable for your environment.
|
|
127
|
-
|
|
128
|
-
</details>
|
|
129
|
-
|
|
130
114
|
---
|
|
131
115
|
|
|
132
116
|
## 📦 Installation
|
|
@@ -857,6 +841,16 @@ await sock.sendMessage(jid, { sticker: { url: './sticker.webp' } })
|
|
|
857
841
|
|
|
858
842
|
// Premium sticker
|
|
859
843
|
await sock.sendMessage(jid, { sticker: buffer, premium: 1 })
|
|
844
|
+
|
|
845
|
+
// Sticker with audio — accepts any format (buffer, url, path)
|
|
846
|
+
await sock.sendMessage(jid, { sticker: buffer, audio: './sound.mp3' })
|
|
847
|
+
await sock.sendMessage(jid, { sticker: { url: './sticker.webp' }, audio: { url: 'https://example.com/sound.ogg' } })
|
|
848
|
+
await sock.sendMessage(jid, { sticker: buffer, audio: buffer })
|
|
849
|
+
|
|
850
|
+
// Pass a pre-resolved audioMessage proto directly
|
|
851
|
+
await sock.sendMessage(jid, { sticker: buffer, audioMessage: resolvedAudioMessageObject })
|
|
852
|
+
|
|
853
|
+
// ⚠️ Audio attachment is not supported for sticker packs — only individual stickers
|
|
860
854
|
```
|
|
861
855
|
|
|
862
856
|
</details>
|
|
@@ -2291,6 +2285,8 @@ await sock.sendMessage(jid, {
|
|
|
2291
2285
|
<details>
|
|
2292
2286
|
<summary><strong>Show sticker pack examples</strong></summary>
|
|
2293
2287
|
|
|
2288
|
+
> ⚠️ Sticker audio (`audio` / `audioMessage`) is not supported for sticker packs. It only works on individual sticker messages.
|
|
2289
|
+
|
|
2294
2290
|
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
2291
|
|
|
2296
2292
|
```javascript
|
|
@@ -4104,10 +4100,10 @@ This project is **not** affiliated with WhatsApp or Meta. Use responsibly:
|
|
|
4104
4100
|
|
|
4105
4101
|
<div align="center">
|
|
4106
4102
|
|
|
4107
|
-
**Made with ❤️ by [
|
|
4103
|
+
**Made with ❤️ by [zervonex](https://github.com/zervonex)**
|
|
4108
4104
|
|
|
4109
4105
|
⭐ **Star us on GitHub!** ⭐
|
|
4110
4106
|
|
|
4111
|
-
[GitHub](https://github.com/
|
|
4107
|
+
[GitHub](https://github.com/zervonex/baileys) • [NPM](https://www.npmjs.com/package/@zervonexx/baileys)
|
|
4112
4108
|
|
|
4113
4109
|
</div>
|