@pontalabs/baileys 1.2.9 → 1.2.11
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 +360 -142
- package/WAProto/CHANGES-2.26.47.10.md +429 -0
- package/WAProto/WAProto.proto +1250 -4
- package/lib/Types/Message.d.ts +61 -1
- package/lib/Utils/beta-messages.d.ts +5 -0
- package/lib/Utils/beta-messages.js +153 -0
- package/lib/Utils/index.d.ts +1 -0
- package/lib/Utils/index.js +1 -0
- package/lib/Utils/mbuilder.js +6 -0
- package/lib/Utils/messages.js +18 -1
- package/lib/Utils/proto-extension-data.js +1 -0
- package/lib/Utils/proto-extensions-core.d.ts +5 -0
- package/lib/Utils/proto-extensions-core.js +300 -0
- package/lib/Utils/proto-extensions.d.ts +5 -0
- package/lib/Utils/proto-extensions.js +5 -0
- package/lib/Utils/rich-message-utils.d.ts +8 -0
- package/lib/Utils/rich-message-utils.js +27 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,87 +1,126 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
<img src="https://raw.githubusercontent.com/PontaSja/image/408b34d9d8521dd22688a24d6b28db3f8ab1825a/IMG-20260710-WA0070.jpg" alt="PontaSockets Banner" width="720" style="border-radius: 12px;" />
|
|
3
|
+
<a id="top"></a>
|
|
5
4
|
|
|
6
|
-
<
|
|
5
|
+
<img src="https://raw.githubusercontent.com/PontaSja/image/408b34d9d8521dd22688a24d6b28db3f8ab1825a/IMG-20260710-WA0070.jpg" alt="PontaLabs Baileys Banner" width="760" />
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
</h2>
|
|
7
|
+
<h1>
|
|
8
|
+
<img src="https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Hand%20gestures/Waving%20Hand.png" alt="Waving Hand" width="36" />
|
|
9
|
+
Baileys PontaLabs
|
|
10
|
+
</h1>
|
|
13
11
|
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<img src="https://img.shields.io/npm/v/@pontalabs/baileys?style=flat-square&color=cb3837&label=npm&logo=npm" alt="NPM Version" />
|
|
19
|
-
</a>
|
|
20
|
-
<a href="https://nodejs.org">
|
|
21
|
-
<img src="https://img.shields.io/badge/node-%3E%3D18.x-339933?style=flat-square&logo=node.js&logoColor=white" alt="Node.js" />
|
|
22
|
-
</a>
|
|
23
|
-
<a href="./LICENSE">
|
|
24
|
-
<img src="https://img.shields.io/badge/license-Non--Commercial-orange?style=flat-square" alt="License" />
|
|
25
|
-
</a>
|
|
26
|
-
<a href="https://github.com/WhiskeySockets/Baileys">
|
|
27
|
-
<img src="https://img.shields.io/badge/fork-whiskeysockets%2Fbaileys-blue?style=flat-square&logo=github" alt="Fork" />
|
|
28
|
-
</a>
|
|
12
|
+
<p>
|
|
13
|
+
<b>WhatsApp Web API untuk Node.js</b> — fork dari <code>@whiskeysockets/baileys</code><br>
|
|
14
|
+
dengan patch eksklusif, AI rich messages, dan fitur WhatsApp tingkat lanjut.
|
|
15
|
+
</p>
|
|
29
16
|
|
|
30
|
-
<
|
|
17
|
+
<p>
|
|
18
|
+
<a href="https://www.npmjs.com/package/@pontalabs/baileys"><img src="https://img.shields.io/npm/v/@pontalabs/baileys?style=for-the-badge&color=cb3837&label=npm&logo=npm" alt="NPM Version" /></a>
|
|
19
|
+
<a href="https://www.npmjs.com/package/@pontalabs/baileys"><img src="https://img.shields.io/npm/dm/@pontalabs/baileys?style=for-the-badge&color=0ea5e9&label=downloads" alt="NPM Downloads" /></a>
|
|
20
|
+
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D18.x-339933?style=for-the-badge&logo=node.js&logoColor=white" alt="Node.js" /></a>
|
|
21
|
+
<br>
|
|
22
|
+
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-Non--Commercial-orange?style=for-the-badge" alt="License" /></a>
|
|
23
|
+
<a href="https://github.com/WhiskeySockets/Baileys"><img src="https://img.shields.io/badge/fork_of-WhiskeySockets%2FBaileys-1f6feb?style=for-the-badge&logo=github" alt="Fork" /></a>
|
|
24
|
+
<a href="https://whatsapp.com/channel/0029VaAAkwOIN9ii1Tc6Mz1X"><img src="https://img.shields.io/badge/WhatsApp-Channel-25D366?style=for-the-badge&logo=whatsapp&logoColor=white" alt="WhatsApp Channel" /></a>
|
|
25
|
+
</p>
|
|
31
26
|
|
|
32
|
-
<p
|
|
27
|
+
<p>
|
|
28
|
+
<a href="#-installation"><b>Installation</b></a> •
|
|
29
|
+
<a href="#-quick-start"><b>Quick Start</b></a> •
|
|
30
|
+
<a href="#-documentation"><b>Documentation</b></a> •
|
|
31
|
+
<a href="#-rich-messages"><b>Rich Messages</b></a> •
|
|
32
|
+
<a href="https://app.pontalabs.zone.id"><b>REST API</b></a> •
|
|
33
|
+
<a href="#-contact"><b>Contact</b></a>
|
|
34
|
+
</p>
|
|
33
35
|
|
|
34
36
|
</div>
|
|
35
37
|
|
|
38
|
+
<br>
|
|
39
|
+
|
|
40
|
+
> [!TIP]
|
|
41
|
+
> **⚡ PontaLabs REST API** — Tidak mau repot setup socket sendiri? Pakai REST API PontaLabs dan nikmati semua fiturnya langsung lewat HTTP.
|
|
42
|
+
>
|
|
43
|
+
> <a href="https://app.pontalabs.zone.id"><img src="https://img.shields.io/badge/REST_API-Explore_Now-8B5CF6?style=for-the-badge&logo=fastapi&logoColor=white" alt="Explore REST API" /></a> 🔗 **[app.pontalabs.zone.id](https://app.pontalabs.zone.id)**
|
|
44
|
+
|
|
36
45
|
---
|
|
37
46
|
|
|
38
|
-
|
|
47
|
+
## ✨ Features
|
|
39
48
|
|
|
40
|
-
<
|
|
49
|
+
<table>
|
|
50
|
+
<tr>
|
|
51
|
+
<td width="50%" valign="top">
|
|
41
52
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
</a>
|
|
46
|
-
</p>
|
|
53
|
+
**🔌 Koneksi**
|
|
54
|
+
- Login via QR Code atau Pairing Code
|
|
55
|
+
- Custom pairing code 8 digit
|
|
47
56
|
|
|
48
|
-
|
|
57
|
+
**📨 Pesan Standar**
|
|
58
|
+
- Text, Image, Video, Audio/PTT, Music
|
|
59
|
+
- Instant media, Spoiler, View Once
|
|
60
|
+
- Audio Sticker, Album, Contact, Location
|
|
61
|
+
- Poll & Quiz, Event & Event Invite
|
|
62
|
+
- After-read timer, Pin & Keep
|
|
49
63
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
<b>https://app.pontalabs.zone.id</b>
|
|
53
|
-
</a>
|
|
54
|
-
</p>
|
|
64
|
+
</td>
|
|
65
|
+
<td width="50%" valign="top">
|
|
55
66
|
|
|
56
|
-
|
|
67
|
+
**🤖 AI Rich Messages**
|
|
68
|
+
- Rich Text, HTML, Code Block, Table
|
|
69
|
+
- Images, Video, LaTeX, Suggestions
|
|
70
|
+
- Product, Post, Reels, Sources
|
|
71
|
+
- Mixed `items` & `richResponse` + citation
|
|
57
72
|
|
|
58
|
-
|
|
73
|
+
**🧩 Interaktif & Lainnya**
|
|
74
|
+
- Native Flow, Carousel, List, Buttons
|
|
75
|
+
- Location + Buttons, Order Status
|
|
76
|
+
- Newsletter, Groups, Group Status, Privacy
|
|
77
|
+
|
|
78
|
+
</td>
|
|
79
|
+
</tr>
|
|
80
|
+
</table>
|
|
59
81
|
|
|
60
82
|
---
|
|
61
83
|
|
|
62
84
|
## 📑 Table of Contents
|
|
63
85
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
- [
|
|
68
|
-
- [
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
- [
|
|
73
|
-
- [
|
|
74
|
-
- [
|
|
75
|
-
- [
|
|
76
|
-
- [
|
|
77
|
-
- [
|
|
78
|
-
- [
|
|
79
|
-
- [
|
|
86
|
+
<details open>
|
|
87
|
+
<summary><b>Klik untuk buka / tutup</b></summary>
|
|
88
|
+
|
|
89
|
+
- [✨ Features](#-features)
|
|
90
|
+
- [📋 Requirements](#-requirements)
|
|
91
|
+
- [📥 Installation](#-installation)
|
|
92
|
+
- [🚀 Quick Start](#-quick-start)
|
|
93
|
+
- [📖 Documentation](#-documentation)
|
|
94
|
+
- [🔌 Connecting](#-connecting)
|
|
95
|
+
- [📡 Events](#-events)
|
|
96
|
+
- [📨 Sending Messages](#-sending-messages)
|
|
97
|
+
- [📍 Location + Buttons](#-location--buttons)
|
|
98
|
+
- [📦 Order Status](#-order-status)
|
|
99
|
+
- [🤖 Rich Messages](#-rich-messages)
|
|
100
|
+
- [📣 Newsletter](#-newsletter)
|
|
101
|
+
- [👥 Groups](#-groups)
|
|
102
|
+
- [🔒 Privacy](#-privacy)
|
|
103
|
+
- [⚙️ Advanced](#️-advanced)
|
|
104
|
+
- [💬 Contact](#-contact)
|
|
105
|
+
- [🤝 Contributing](#-contributing)
|
|
106
|
+
- [📜 License](#-license)
|
|
107
|
+
- [⚠️ Disclaimer](#️-disclaimer)
|
|
108
|
+
|
|
109
|
+
</details>
|
|
80
110
|
|
|
81
111
|
---
|
|
82
112
|
|
|
83
|
-
|
|
84
|
-
|
|
113
|
+
## 📋 Requirements
|
|
114
|
+
|
|
115
|
+
| Kebutuhan | Versi |
|
|
116
|
+
|:---|:---|
|
|
117
|
+
| Node.js | `>= 18.x` |
|
|
118
|
+
| Package manager | npm / yarn / pnpm / bun |
|
|
119
|
+
| Akun WhatsApp | Aktif, untuk scan QR atau pairing code |
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## 📥 Installation
|
|
85
124
|
|
|
86
125
|
```bash
|
|
87
126
|
# npm
|
|
@@ -89,14 +128,17 @@ npm install @pontalabs/baileys
|
|
|
89
128
|
|
|
90
129
|
# yarn
|
|
91
130
|
yarn add @pontalabs/baileys
|
|
92
|
-
```
|
|
93
131
|
|
|
94
|
-
|
|
132
|
+
# pnpm
|
|
133
|
+
pnpm add @pontalabs/baileys
|
|
134
|
+
|
|
135
|
+
# bun
|
|
136
|
+
bun add @pontalabs/baileys
|
|
137
|
+
```
|
|
95
138
|
|
|
96
139
|
---
|
|
97
140
|
|
|
98
|
-
|
|
99
|
-
<summary><h2>🚀 Quick Start</h2></summary>
|
|
141
|
+
## 🚀 Quick Start
|
|
100
142
|
|
|
101
143
|
```js
|
|
102
144
|
import makeWASocket, { useMultiFileAuthState } from '@pontalabs/baileys'
|
|
@@ -119,7 +161,10 @@ async function start() {
|
|
|
119
161
|
start()
|
|
120
162
|
```
|
|
121
163
|
|
|
122
|
-
|
|
164
|
+
> [!NOTE]
|
|
165
|
+
> Sesi login disimpan di folder `./sessions`. Jalankan ulang script tanpa perlu scan QR lagi selama sesi masih valid.
|
|
166
|
+
|
|
167
|
+
<div align="right"><a href="#top">⬆️ Back to top</a></div>
|
|
123
168
|
|
|
124
169
|
---
|
|
125
170
|
|
|
@@ -189,13 +234,16 @@ sock.ev.on('messages.update', (m) => {
|
|
|
189
234
|
|
|
190
235
|
### 📨 Sending Messages
|
|
191
236
|
|
|
192
|
-
```
|
|
237
|
+
```ts
|
|
193
238
|
sock.sendMessage(jid, content, options?)
|
|
194
|
-
// jid — Recipient JID (user or group)
|
|
195
|
-
// content — Message payload object
|
|
196
|
-
// options — Optional: { quoted, ephemeral, ... }
|
|
197
239
|
```
|
|
198
240
|
|
|
241
|
+
| Parameter | Keterangan |
|
|
242
|
+
|:---|:---|
|
|
243
|
+
| `jid` | Recipient JID (user atau group) |
|
|
244
|
+
| `content` | Message payload object |
|
|
245
|
+
| `options` | Opsional: `{ quoted, ephemeral, ... }` |
|
|
246
|
+
|
|
199
247
|
#### Standard Messages
|
|
200
248
|
|
|
201
249
|
<details>
|
|
@@ -207,6 +255,17 @@ await sock.sendMessage(jid, { text: 'Reply!' }, { quoted: message })
|
|
|
207
255
|
```
|
|
208
256
|
</details>
|
|
209
257
|
|
|
258
|
+
<details>
|
|
259
|
+
<summary><b>⏳ After-Read Timer</b></summary>
|
|
260
|
+
|
|
261
|
+
```js
|
|
262
|
+
await sock.sendMessage(jid, { text: 'Pesan sementara', afterReadDuration: 60 })
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
> `afterReadDuration` is in seconds and works with any message type.
|
|
266
|
+
|
|
267
|
+
</details>
|
|
268
|
+
|
|
210
269
|
<details>
|
|
211
270
|
<summary><b>🖼️ Image</b></summary>
|
|
212
271
|
|
|
@@ -242,6 +301,29 @@ await sock.sendMessage(jid, {
|
|
|
242
301
|
```
|
|
243
302
|
</details>
|
|
244
303
|
|
|
304
|
+
<details>
|
|
305
|
+
<summary><b>⚡ Instant Image / Video</b></summary>
|
|
306
|
+
|
|
307
|
+
```js
|
|
308
|
+
await sock.sendMessage(jid, { instantImage: { url: 'https://example.com/foto.jpg' }, caption: 'Instan' })
|
|
309
|
+
await sock.sendMessage(jid, { instantVideo: { url: 'https://example.com/klip.mp4' }, caption: 'Instan' })
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
</details>
|
|
313
|
+
|
|
314
|
+
<details>
|
|
315
|
+
<summary><b>🙈 Spoiler</b></summary>
|
|
316
|
+
|
|
317
|
+
```js
|
|
318
|
+
await sock.sendMessage(jid, {
|
|
319
|
+
image: { url: 'https://example.com/foto.jpg' },
|
|
320
|
+
caption: 'Awas spoiler',
|
|
321
|
+
spoiler: true
|
|
322
|
+
})
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
</details>
|
|
326
|
+
|
|
245
327
|
<details>
|
|
246
328
|
<summary><b>🎵 Audio / PTT</b></summary>
|
|
247
329
|
|
|
@@ -258,6 +340,43 @@ await sock.sendMessage(jid, {
|
|
|
258
340
|
```
|
|
259
341
|
</details>
|
|
260
342
|
|
|
343
|
+
<details>
|
|
344
|
+
<summary><b>🧷 Audio Sticker</b></summary>
|
|
345
|
+
|
|
346
|
+
```js
|
|
347
|
+
await sock.sendMessage(jid, {
|
|
348
|
+
audioSticker: {
|
|
349
|
+
sticker: { url: 'https://example.com/stiker.webp' },
|
|
350
|
+
audio: { url: 'https://example.com/suara.ogg' },
|
|
351
|
+
animated: false,
|
|
352
|
+
seconds: 5
|
|
353
|
+
}
|
|
354
|
+
})
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
> `sticker` harus WebP 512x512 dan `audio` harus OGG Opus (voice note). Keduanya bisa berupa `{ url }` atau Buffer, misalnya `fs.readFileSync('./suara.ogg')` untuk file lokal. `animated` dan `seconds` opsional.
|
|
358
|
+
</details>
|
|
359
|
+
|
|
360
|
+
<details>
|
|
361
|
+
<summary><b>🎶 Music</b></summary>
|
|
362
|
+
|
|
363
|
+
```js
|
|
364
|
+
await sock.sendMessage(jid, {
|
|
365
|
+
music: {
|
|
366
|
+
songUri: 'https://example.com/song.mp3',
|
|
367
|
+
artworkUri: 'https://example.com/cover.jpg',
|
|
368
|
+
lyrics: [
|
|
369
|
+
{ start: 0, end: 2500, text: 'Baris pertama' },
|
|
370
|
+
{ start: 2500, end: 5000, text: 'Baris kedua' }
|
|
371
|
+
]
|
|
372
|
+
}
|
|
373
|
+
})
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
> `lyrics` is optional. Each line takes `start` / `end` in milliseconds and an optional `words` array (`startIndex`, `endIndex`, `start`, `end`) for word-level sync.
|
|
377
|
+
|
|
378
|
+
</details>
|
|
379
|
+
|
|
261
380
|
<details>
|
|
262
381
|
<summary><b>👤 Contact</b></summary>
|
|
263
382
|
|
|
@@ -288,6 +407,16 @@ await sock.sendMessage(jid, {
|
|
|
288
407
|
```
|
|
289
408
|
</details>
|
|
290
409
|
|
|
410
|
+
<details>
|
|
411
|
+
<summary><b>🛰️ Request Location</b></summary>
|
|
412
|
+
|
|
413
|
+
```js
|
|
414
|
+
await sock.sendMessage(jid, { requestLocation: true })
|
|
415
|
+
await sock.sendMessage(jid, { requestLocationUpdate: message.key })
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
</details>
|
|
419
|
+
|
|
291
420
|
<details>
|
|
292
421
|
<summary><b>💥 React</b></summary>
|
|
293
422
|
|
|
@@ -334,6 +463,20 @@ await sock.sendMessage(jid, {
|
|
|
334
463
|
}
|
|
335
464
|
})
|
|
336
465
|
```
|
|
466
|
+
|
|
467
|
+
**Poll options**
|
|
468
|
+
|
|
469
|
+
```js
|
|
470
|
+
await sock.sendMessage(jid, {
|
|
471
|
+
poll: {
|
|
472
|
+
name: 'Makan apa?',
|
|
473
|
+
values: ['Nasi', 'Mie'],
|
|
474
|
+
selectableCount: 1,
|
|
475
|
+
hideVoter: true,
|
|
476
|
+
canAddOption: true
|
|
477
|
+
}
|
|
478
|
+
})
|
|
479
|
+
```
|
|
337
480
|
</details>
|
|
338
481
|
|
|
339
482
|
<details>
|
|
@@ -378,6 +521,26 @@ await sock.sendMessage(jid, {
|
|
|
378
521
|
```
|
|
379
522
|
</details>
|
|
380
523
|
|
|
524
|
+
<details>
|
|
525
|
+
<summary><b>📨 Event Invite</b></summary>
|
|
526
|
+
|
|
527
|
+
```js
|
|
528
|
+
await sock.sendMessage(jid, {
|
|
529
|
+
eventInvite: {
|
|
530
|
+
eventId: 'ID_PESAN_EVENT',
|
|
531
|
+
title: 'Rapat Mingguan',
|
|
532
|
+
startDate: new Date('2026-12-01T09:00:00+07:00'),
|
|
533
|
+
endDate: new Date('2026-12-01T10:00:00+07:00'),
|
|
534
|
+
location: 'Ruang Meeting',
|
|
535
|
+
caption: 'Jangan telat'
|
|
536
|
+
}
|
|
537
|
+
})
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
> `eventId` is the message ID of an existing event.
|
|
541
|
+
|
|
542
|
+
</details>
|
|
543
|
+
|
|
381
544
|
<details>
|
|
382
545
|
<summary><b>👨💻 Interactive (Native Flow & Carousel)</b></summary>
|
|
383
546
|
|
|
@@ -510,6 +673,22 @@ await sock.sendMessage(jid, { keep: { key: message.key, type: 1 } })
|
|
|
510
673
|
```
|
|
511
674
|
</details>
|
|
512
675
|
|
|
676
|
+
<details>
|
|
677
|
+
<summary><b>🧩 Raw Message Field</b></summary>
|
|
678
|
+
|
|
679
|
+
```js
|
|
680
|
+
await sock.sendMessage(jid, {
|
|
681
|
+
beta: { pollAddOptionMessage: { /* fields from WAProto */ } }
|
|
682
|
+
})
|
|
683
|
+
```
|
|
684
|
+
|
|
685
|
+
> Accepts any `*Message` / `*Metadata` field of `proto.Message`. Payment, encryption-key and internal control messages are rejected.
|
|
686
|
+
|
|
687
|
+
</details>
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
<div align="right"><a href="#top">⬆️ Back to top</a></div>
|
|
691
|
+
|
|
513
692
|
---
|
|
514
693
|
|
|
515
694
|
### 📍 Location + Buttons
|
|
@@ -596,22 +775,25 @@ await sock.sendMessage(jid, {
|
|
|
596
775
|
<details>
|
|
597
776
|
<summary><b>📋 Fields Reference</b></summary>
|
|
598
777
|
|
|
599
|
-
| Field | Type |
|
|
600
|
-
|
|
601
|
-
| `latitude` | `number` |
|
|
602
|
-
| `longitude` | `number` |
|
|
603
|
-
| `name` | `string` |
|
|
604
|
-
| `address` | `string` |
|
|
605
|
-
| `text` | `string` |
|
|
606
|
-
| `footer` | `string` |
|
|
607
|
-
| `thumbnail` | `Buffer / URL / path` |
|
|
608
|
-
| `listButtonText` | `string` |
|
|
609
|
-
| `listSectionTitle` | `string` |
|
|
610
|
-
| `listMenu` | `array` |
|
|
611
|
-
| `extraButtons` | `array` |
|
|
778
|
+
| Field | Type | Keterangan | Default |
|
|
779
|
+
|:---|:---|:---|:---|
|
|
780
|
+
| `latitude` | `number` | Latitude coordinate | `0` |
|
|
781
|
+
| `longitude` | `number` | Longitude coordinate | `0` |
|
|
782
|
+
| `name` | `string` | Place name | `'Location'` |
|
|
783
|
+
| `address` | `string` | Text address | `''` |
|
|
784
|
+
| `text` | `string` | Message body text | `''` |
|
|
785
|
+
| `footer` | `string` | Footer text | `''` |
|
|
786
|
+
| `thumbnail` | `Buffer / URL / path` | Map preview image | ✅ required |
|
|
787
|
+
| `listButtonText` | `string` | List button label | `'Pilih Menu'` |
|
|
788
|
+
| `listSectionTitle` | `string` | List section title | `'Pilihan'` |
|
|
789
|
+
| `listMenu` | `array` | Menu rows | — |
|
|
790
|
+
| `extraButtons` | `array` | Extra buttons | — |
|
|
612
791
|
|
|
613
792
|
</details>
|
|
614
793
|
|
|
794
|
+
|
|
795
|
+
<div align="right"><a href="#top">⬆️ Back to top</a></div>
|
|
796
|
+
|
|
615
797
|
---
|
|
616
798
|
|
|
617
799
|
### 📦 Order Status
|
|
@@ -678,31 +860,39 @@ await sock.sendMessage(jid, {
|
|
|
678
860
|
<details>
|
|
679
861
|
<summary><b>📋 Fields Reference</b></summary>
|
|
680
862
|
|
|
681
|
-
| Field | Type |
|
|
682
|
-
|
|
683
|
-
| `image` | `Buffer / URL / path` |
|
|
684
|
-
| `title` | `string` |
|
|
685
|
-
| `text` | `string` |
|
|
686
|
-
| `footer` | `string` |
|
|
687
|
-
| `referenceId` | `string` |
|
|
688
|
-
| `status` | `string` |
|
|
689
|
-
| `subtotalValue` | `number` |
|
|
690
|
-
| `subtotalOffset` | `number` |
|
|
691
|
-
| `taxValue` | `number` |
|
|
692
|
-
| `taxOffset` | `number` |
|
|
693
|
-
| `currency` | `string` |
|
|
863
|
+
| Field | Type | Keterangan | Default |
|
|
864
|
+
|:---|:---|:---|:---|
|
|
865
|
+
| `image` | `Buffer / URL / path` | Header card image | ✅ required |
|
|
866
|
+
| `title` | `string` | Header title | `'Order Status'` |
|
|
867
|
+
| `text` | `string` | Body text | `'Silakan cek status pesanan Anda.'` |
|
|
868
|
+
| `footer` | `string` | Footer text | `'Powered by PontaCT'` |
|
|
869
|
+
| `referenceId` | `string` | Order reference ID | `'PT-001'` |
|
|
870
|
+
| `status` | `string` | Order status | `'PROCESSING'` |
|
|
871
|
+
| `subtotalValue` | `number` | Subtotal value (in offset units) | `0` |
|
|
872
|
+
| `subtotalOffset` | `number` | Value divider | `100` |
|
|
873
|
+
| `taxValue` | `number` | Tax value | `0` |
|
|
874
|
+
| `taxOffset` | `number` | Tax divider | `100` |
|
|
875
|
+
| `currency` | `string` | Currency code | `'IDR'` |
|
|
694
876
|
|
|
695
877
|
> **Status values:** `PROCESSING` · `SHIPPED` · `DELIVERED` · `CANCELLED` · `REFUNDED`
|
|
696
878
|
|
|
697
879
|
</details>
|
|
698
880
|
|
|
881
|
+
|
|
882
|
+
<div align="right"><a href="#top">⬆️ Back to top</a></div>
|
|
883
|
+
|
|
699
884
|
---
|
|
700
885
|
|
|
701
886
|
### 🤖 Rich Messages
|
|
702
887
|
|
|
703
888
|
> All rich messages are sent via standard `sendMessage` and rendered as AI bot messages in WhatsApp. Use the appropriate key instead of `text`, `image`, `video`, etc.
|
|
704
889
|
|
|
705
|
-
|
|
890
|
+
<table>
|
|
891
|
+
<tr><td><b>🧭 Quick jump</b></td><td>
|
|
892
|
+
<a href="#-rich-text">Text</a> · <a href="#-rich-html">HTML</a> · <a href="#-rich-code-block">Code</a> · <a href="#-rich-table">Table</a> · <a href="#️-rich-images">Images</a> · <a href="#-rich-video">Video</a> · <a href="#-rich-suggestions">Suggestions</a> · <a href="#-rich-latex">LaTeX</a><br>
|
|
893
|
+
<a href="#️-rich-product">Product</a> · <a href="#-rich-post">Post</a> · <a href="#-rich-reels">Reels</a> · <a href="#-rich-sources">Sources</a> · <a href="#-rich-tip--footer">Tip & Footer</a> · <a href="#-rich-mixed--items">Mixed</a> · <a href="#-rich-response--richresponse">Response</a> · <a href="#️-rich-options">Options</a>
|
|
894
|
+
</td></tr>
|
|
895
|
+
</table>
|
|
706
896
|
|
|
707
897
|
---
|
|
708
898
|
|
|
@@ -800,19 +990,17 @@ await sock.sendMessage(jid, {
|
|
|
800
990
|
<details>
|
|
801
991
|
<summary><b>Supported Languages</b></summary>
|
|
802
992
|
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
| PowerShell / CMD | `powershell` · `ps1` · `cmd` · `bat` |
|
|
815
|
-
| SQL / JSON | `sql` · `json` |
|
|
993
|
+
- **JavaScript** — `javascript` · `js`
|
|
994
|
+
- **TypeScript** — `typescript` · `ts`
|
|
995
|
+
- **Python** — `python` · `py`
|
|
996
|
+
- **Bash / Shell** — `bash` · `sh` · `zsh`
|
|
997
|
+
- **Go** — `go` · `golang`
|
|
998
|
+
- **Rust** — `rust` · `rs`
|
|
999
|
+
- **C / C++** — `c` · `h` · `cpp` · `c++`
|
|
1000
|
+
- **C#** — `csharp` · `cs`
|
|
1001
|
+
- **CSS / HTML** — `css` · `html`
|
|
1002
|
+
- **PowerShell / CMD** — `powershell` · `ps1` · `cmd` · `bat`
|
|
1003
|
+
- **SQL / JSON** — `sql` · `json`
|
|
816
1004
|
|
|
817
1005
|
</details>
|
|
818
1006
|
|
|
@@ -822,7 +1010,7 @@ await sock.sendMessage(jid, {
|
|
|
822
1010
|
|
|
823
1011
|
> Structured table with `title`, `headers`, and `rows`.
|
|
824
1012
|
>
|
|
825
|
-
>
|
|
1013
|
+
> **⚠️ Catatan:** Shorthand `{ title?, headers?, rows }` ini hanya berlaku untuk key `table` top-level dan di dalam `items`. Kalau dipakai di dalam `richResponse`, isi `table` harus sudah berupa array baris jadi — lihat [Rich Response](#-rich-response--richresponse).
|
|
826
1014
|
|
|
827
1015
|
<details>
|
|
828
1016
|
<summary><b>Simple Table</b></summary>
|
|
@@ -1231,18 +1419,18 @@ await sock.sendMessage(jid, {
|
|
|
1231
1419
|
<details>
|
|
1232
1420
|
<summary><b>📋 Fields Reference</b></summary>
|
|
1233
1421
|
|
|
1234
|
-
| Field | Type |
|
|
1235
|
-
|
|
1236
|
-
| `title` | `string` |
|
|
1237
|
-
| `profileIconUrl` | `string` |
|
|
1238
|
-
| `thumbnailUrl` | `string` |
|
|
1239
|
-
| `videoUrl` | `string` |
|
|
1240
|
-
| `reels_title` | `string` | `''` |
|
|
1241
|
-
| `likes_count` | `number` | `0` |
|
|
1242
|
-
| `shares_count` | `number` | `0` |
|
|
1243
|
-
| `view_count` | `number` | `0` |
|
|
1244
|
-
| `reel_source` | `string` | `'IG'` |
|
|
1245
|
-
| `is_verified` | `boolean` | `false` |
|
|
1422
|
+
| Field | Type | Keterangan | Default |
|
|
1423
|
+
|:---|:---|:---|:---|
|
|
1424
|
+
| `title` | `string` | Username / creator name | — |
|
|
1425
|
+
| `profileIconUrl` | `string` | Avatar URL | — |
|
|
1426
|
+
| `thumbnailUrl` | `string` | Thumbnail cover URL | — |
|
|
1427
|
+
| `videoUrl` | `string` | Video source URL | — |
|
|
1428
|
+
| `reels_title` | `string` | Reel title | `''` |
|
|
1429
|
+
| `likes_count` | `number` | Like count | `0` |
|
|
1430
|
+
| `shares_count` | `number` | Share count | `0` |
|
|
1431
|
+
| `view_count` | `number` | View count | `0` |
|
|
1432
|
+
| `reel_source` | `string` | Source platform | `'IG'` |
|
|
1433
|
+
| `is_verified` | `boolean` | Verified badge | `false` |
|
|
1246
1434
|
|
|
1247
1435
|
</details>
|
|
1248
1436
|
|
|
@@ -1375,8 +1563,8 @@ await sock.sendMessage(jid, {
|
|
|
1375
1563
|
}, { quoted: message })
|
|
1376
1564
|
```
|
|
1377
1565
|
|
|
1378
|
-
```
|
|
1379
|
-
|
|
1566
|
+
```js
|
|
1567
|
+
// build delay (muncul satu per satu)
|
|
1380
1568
|
await sock.sendMessage(jid, {
|
|
1381
1569
|
items: [
|
|
1382
1570
|
{ text: 'Query yang dijalankan:' },
|
|
@@ -1530,9 +1718,24 @@ await sock.sendMessage(jid, {
|
|
|
1530
1718
|
```
|
|
1531
1719
|
</details>
|
|
1532
1720
|
|
|
1721
|
+
<details>
|
|
1722
|
+
<summary><b><code>bypassDownload</code> — re-send otomatis rich message</b></summary>
|
|
1723
|
+
|
|
1724
|
+
> Default `true`. Setiap rich message dikirim ulang sekali sebagai self-edit tepat setelah relay pertama, dan isi unified response otomatis memakai mode gzip. Matikan per pesan dengan `false` (bypass dan gzip ikut mati).
|
|
1725
|
+
|
|
1726
|
+
```js
|
|
1727
|
+
await sock.sendMessage(jid, { richText: 'Bypass aktif secara default' })
|
|
1728
|
+
|
|
1729
|
+
await sock.sendMessage(jid, { richText: 'tanpa bypass' }, { bypassDownload: false })
|
|
1730
|
+
```
|
|
1731
|
+
</details>
|
|
1732
|
+
|
|
1733
|
+
|
|
1734
|
+
<div align="right"><a href="#top">⬆️ Back to top</a></div>
|
|
1735
|
+
|
|
1533
1736
|
---
|
|
1534
1737
|
|
|
1535
|
-
|
|
1738
|
+
### 📣 Newsletter
|
|
1536
1739
|
|
|
1537
1740
|
<details>
|
|
1538
1741
|
<summary><b>📋 Get Newsletter Metadata</b></summary>
|
|
@@ -1583,9 +1786,12 @@ await sock.newsletterReactMessage(
|
|
|
1583
1786
|
```
|
|
1584
1787
|
</details>
|
|
1585
1788
|
|
|
1789
|
+
|
|
1790
|
+
<div align="right"><a href="#top">⬆️ Back to top</a></div>
|
|
1791
|
+
|
|
1586
1792
|
---
|
|
1587
1793
|
|
|
1588
|
-
|
|
1794
|
+
### 👥 Groups
|
|
1589
1795
|
|
|
1590
1796
|
<details>
|
|
1591
1797
|
<summary><b>🔄 Create Group</b></summary>
|
|
@@ -1687,21 +1893,24 @@ await sock.sendMessage(jid, {
|
|
|
1687
1893
|
<details>
|
|
1688
1894
|
<summary><b>📋 Fields Reference</b></summary>
|
|
1689
1895
|
|
|
1690
|
-
| Field | Type |
|
|
1691
|
-
|
|
1692
|
-
| `message` | `string / object` |
|
|
1693
|
-
| `audienceType` | `number` |
|
|
1694
|
-
| `backgroundArgb` | `number` |
|
|
1695
|
-
| `textArgb` | `number` |
|
|
1696
|
-
| `font` | `number` |
|
|
1896
|
+
| Field | Type | Keterangan | Default |
|
|
1897
|
+
|:---|:---|:---|:---|
|
|
1898
|
+
| `message` | `string / object` | Status content (string or WAMessage) | ✅ required |
|
|
1899
|
+
| `audienceType` | `number` | Target audience (0 = all) | `0` |
|
|
1900
|
+
| `backgroundArgb` | `number` | Background ARGB color (text only) | — |
|
|
1901
|
+
| `textArgb` | `number` | Text ARGB color (text only) | — |
|
|
1902
|
+
| `font` | `number` | Font style 0–9 (text only) | — |
|
|
1697
1903
|
|
|
1698
1904
|
</details>
|
|
1699
1905
|
|
|
1700
1906
|
</details>
|
|
1701
1907
|
|
|
1908
|
+
|
|
1909
|
+
<div align="right"><a href="#top">⬆️ Back to top</a></div>
|
|
1910
|
+
|
|
1702
1911
|
---
|
|
1703
1912
|
|
|
1704
|
-
|
|
1913
|
+
### 🔒 Privacy
|
|
1705
1914
|
|
|
1706
1915
|
<details>
|
|
1707
1916
|
<summary><b>🖼️ Profile Picture</b></summary>
|
|
@@ -1734,9 +1943,12 @@ await sock.updateDefaultDisappearingMode(86400) // 0 = disable
|
|
|
1734
1943
|
```
|
|
1735
1944
|
</details>
|
|
1736
1945
|
|
|
1946
|
+
|
|
1947
|
+
<div align="right"><a href="#top">⬆️ Back to top</a></div>
|
|
1948
|
+
|
|
1737
1949
|
---
|
|
1738
1950
|
|
|
1739
|
-
|
|
1951
|
+
### ⚙️ Advanced
|
|
1740
1952
|
|
|
1741
1953
|
<details>
|
|
1742
1954
|
<summary><b>🔧 Debug Logging</b></summary>
|
|
@@ -1782,15 +1994,20 @@ const summary = getAggregateResponsesInEventMessage(eventMsg, sock.user.lid)
|
|
|
1782
1994
|
```
|
|
1783
1995
|
</details>
|
|
1784
1996
|
|
|
1997
|
+
|
|
1998
|
+
<div align="right"><a href="#top">⬆️ Back to top</a></div>
|
|
1999
|
+
|
|
1785
2000
|
---
|
|
1786
2001
|
|
|
1787
|
-
##
|
|
2002
|
+
## 💬 Contact
|
|
1788
2003
|
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
2004
|
+
<div align="center">
|
|
2005
|
+
|
|
2006
|
+
<a href="https://tiktok.com/@ponta.gt"><img src="https://img.shields.io/badge/TikTok-@ponta.gt-000000?style=for-the-badge&logo=tiktok&logoColor=white" alt="TikTok" /></a>
|
|
2007
|
+
<a href="https://whatsapp.com/channel/0029VaAAkwOIN9ii1Tc6Mz1X"><img src="https://img.shields.io/badge/WhatsApp-Channel-25D366?style=for-the-badge&logo=whatsapp&logoColor=white" alt="WhatsApp Channel" /></a>
|
|
2008
|
+
<a href="https://app.pontalabs.zone.id"><img src="https://img.shields.io/badge/REST_API-app.pontalabs.zone.id-8B5CF6?style=for-the-badge&logo=fastapi&logoColor=white" alt="REST API" /></a>
|
|
2009
|
+
|
|
2010
|
+
</div>
|
|
1794
2011
|
|
|
1795
2012
|
---
|
|
1796
2013
|
|
|
@@ -1808,7 +2025,7 @@ const summary = getAggregateResponsesInEventMessage(eventMsg, sock.user.lid)
|
|
|
1808
2025
|
|
|
1809
2026
|
This project is licensed for **personal and non-commercial use only**.
|
|
1810
2027
|
|
|
1811
|
-
| | |
|
|
2028
|
+
| Status | Ketentuan |
|
|
1812
2029
|
|:---:|:---|
|
|
1813
2030
|
| ✅ | Personal use and modification allowed |
|
|
1814
2031
|
| ✅ | Redistribution with attribution allowed |
|
|
@@ -1819,6 +2036,7 @@ This project is licensed for **personal and non-commercial use only**.
|
|
|
1819
2036
|
|
|
1820
2037
|
## ⚠️ Disclaimer
|
|
1821
2038
|
|
|
2039
|
+
> [!WARNING]
|
|
1822
2040
|
> This project is **not affiliated with WhatsApp or Meta** in any way.
|
|
1823
2041
|
> Use at your own risk and refer to WhatsApp's [Terms of Service](https://www.whatsapp.com/legal/terms-of-service) for compliance.
|
|
1824
2042
|
|
|
@@ -1826,10 +2044,10 @@ This project is licensed for **personal and non-commercial use only**.
|
|
|
1826
2044
|
|
|
1827
2045
|
<div align="center">
|
|
1828
2046
|
|
|
1829
|
-
[📦 NPM](https://www.npmjs.com/package/@pontalabs/baileys) · [📖 Baileys Wiki](https://github.com/WhiskeySockets/Baileys/wiki) · [⭐
|
|
2047
|
+
[📦 NPM](https://www.npmjs.com/package/@pontalabs/baileys) · [📖 Baileys Wiki](https://github.com/WhiskeySockets/Baileys/wiki) · [⭐ Back to top](#top)
|
|
1830
2048
|
|
|
1831
2049
|
<br>
|
|
1832
2050
|
|
|
1833
|
-
Made with ♥ by
|
|
2051
|
+
<sub>Made with ♥ by <b>PontaCT</b> · Jika project ini membantu, jangan lupa kasih ⭐</sub>
|
|
1834
2052
|
|
|
1835
2053
|
</div>
|