@zervonexx/baileys 5.0.2 → 5.0.4
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 +11 -18
- package/WAProto/WAProto.json +1 -1
- package/WAProto/WAProto.proto +1 -1
- package/lib/Utils/messages-media.js +6 -0
- package/lib/Utils/messages.js +21 -11
- package/lib/index.js +1 -1
- package/package.json +3 -2
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
|
|
@@ -866,6 +850,15 @@ await sock.sendMessage(jid, { sticker: buffer, audio: buffer })
|
|
|
866
850
|
// Pass a pre-resolved audioMessage proto directly
|
|
867
851
|
await sock.sendMessage(jid, { sticker: buffer, audioMessage: resolvedAudioMessageObject })
|
|
868
852
|
|
|
853
|
+
// Auto extract audio from video sticker (opt-in)
|
|
854
|
+
await sock.sendMessage(jid, { sticker: videoBuffer, extractAudio: true })
|
|
855
|
+
await sock.sendMessage(jid, { sticker: './sticker.mp4', extractAudio: true })
|
|
856
|
+
await sock.sendMessage(jid, { sticker: { url: 'https://example.com/sticker.mp4' }, extractAudio: true })
|
|
857
|
+
|
|
858
|
+
// Notes:
|
|
859
|
+
// ⚠️ extractAudio requires the sticker to be a video — passing an image will throw
|
|
860
|
+
// ⚠️ extractAudio: false is the same as not passing it — sticker sends without audio
|
|
861
|
+
// ⚠️ If no audio is provided at all, sticker sends without audio silently
|
|
869
862
|
// ⚠️ Audio attachment is not supported for sticker packs — only individual stickers
|
|
870
863
|
```
|
|
871
864
|
|
|
@@ -4116,10 +4109,10 @@ This project is **not** affiliated with WhatsApp or Meta. Use responsibly:
|
|
|
4116
4109
|
|
|
4117
4110
|
<div align="center">
|
|
4118
4111
|
|
|
4119
|
-
**Made with ❤️ by [
|
|
4112
|
+
**Made with ❤️ by [zervonex](https://github.com/zervonex)**
|
|
4120
4113
|
|
|
4121
4114
|
⭐ **Star us on GitHub!** ⭐
|
|
4122
4115
|
|
|
4123
|
-
[GitHub](https://github.com/
|
|
4116
|
+
[GitHub](https://github.com/zervonex/baileys) • [NPM](https://www.npmjs.com/package/@zervonexx/baileys)
|
|
4124
4117
|
|
|
4125
4118
|
</div>
|