@victory_is_h1m/custom-baileys 1.3.0 → 1.3.1
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 +27 -3
- package/package.json +10 -2
package/README.md
CHANGED
|
@@ -1,13 +1,37 @@
|
|
|
1
1
|
# @victory_is_h1m/custom-baileys
|
|
2
2
|
|
|
3
|
-
Custom WhatsApp Web API wrapper built on `@whiskeysockets/baileys` with built-in custom pairing code support
|
|
3
|
+
Custom WhatsApp Web API wrapper built on `@whiskeysockets/baileys` with built-in **`VICT-ORYY`** custom pairing code support, Shared Chat Themes & Wallpapers, A2UI Rich UI Cards, Embedded Audio Stickers, View-Once Downloader, and Native Flow Buttons.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Installation
|
|
6
|
+
```bash
|
|
7
|
+
npm install @victory_is_h1m/custom-baileys
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Quick Start
|
|
6
11
|
```javascript
|
|
7
|
-
import createVictoryBaileys from '@victory_is_h1m/custom-baileys';
|
|
12
|
+
import createVictoryBaileys, { A2UI, sendA2UIWidget } from '@victory_is_h1m/custom-baileys';
|
|
8
13
|
|
|
9
14
|
const bot = await createVictoryBaileys({
|
|
10
15
|
phoneNumber: '2348162843527',
|
|
11
16
|
customPairingCode: 'VICT-ORYY',
|
|
17
|
+
onReady: () => console.log('Connected!'),
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
bot.sock.ev.on('messages.upsert', async ({ messages }) => {
|
|
21
|
+
const msg = messages;
|
|
22
|
+
if (!msg.message || msg.key.fromMe) return;
|
|
23
|
+
const jid = msg.key.remoteJid;
|
|
24
|
+
|
|
25
|
+
// View-Once Downloader
|
|
26
|
+
const media = await bot.downloadViewOnce(msg);
|
|
27
|
+
if (media?.type === 'image') await bot.sendImage(jid, media.buffer, media.caption);
|
|
12
28
|
});
|
|
13
29
|
```
|
|
30
|
+
|
|
31
|
+
## Included Features
|
|
32
|
+
- **Custom Pairing Code (`VICT-ORYY`)**: Automatic 8-character pairing code generation with auto-reconnect.
|
|
33
|
+
- **Shared Chat Themes & Wallpapers**: `bot.setTheme(jid, 'red')`, `bot.setBubbleColor(jid, 'blue')`, `bot.setWallpaper(jid, buffer)`, `bot.clearTheme(jid)`.
|
|
34
|
+
- **A2UI Rich UI Cards**: `new A2UI()` builder + `sendA2UIWidget(sock, jid, { a2ui })`.
|
|
35
|
+
- **Embedded Audio Stickers**: `bot.sendAudioSticker(jid, webpBuffer, opusBuffer, isAnimated)`.
|
|
36
|
+
- **View-Once Downloader**: `bot.downloadViewOnce(msg)` for images, videos, and audio.
|
|
37
|
+
- **Native Flow Buttons & Link Cards**: `bot.sendButtons(...)` and `bot.sendLinkCard(...)`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@victory_is_h1m/custom-baileys",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -22,5 +22,13 @@
|
|
|
22
22
|
"types": "dist/index.d.ts",
|
|
23
23
|
"files": [
|
|
24
24
|
"dist"
|
|
25
|
-
]
|
|
25
|
+
],
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com"
|
|
29
|
+
},
|
|
30
|
+
"homepage": "https://github.com",
|
|
31
|
+
"bugs": {
|
|
32
|
+
"url": "https://github.com"
|
|
33
|
+
}
|
|
26
34
|
}
|