@pontalabs/baileys 1.2.6 → 1.2.7

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.
Files changed (2) hide show
  1. package/README.md +905 -573
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,60 +1,41 @@
1
- <img src="https://capsule-render.vercel.app/api?type=waving&color=0:0f0c29,50:302b63,100:24243e&height=220&section=header&text=Baileys%20PontaLabs&fontSize=52&fontColor=ffffff&animation=fadeIn&fontAlignY=38&desc=⚡%20AI%20Rich%20Messages%20•%20High%20Performance%20•%20Advanced%20Features&descAlignY=58&descSize=16" width="100%"/>
2
-
3
1
  <div align="center">
4
2
 
5
- <!-- Animated Banner with Glow -->
6
- <a href="https://github.com/PontaSja">
7
- <img src="https://raw.githubusercontent.com/PontaSja/image/408b34d9d8521dd22688a24d6b28db3f8ab1825a/IMG-20260710-WA0070.jpg" alt="PontaSockets Banner" width="720" style="border-radius: 18px; box-shadow: 0 0 40px rgba(0,217,255,0.4), 0 0 80px rgba(124,58,237,0.3);" />
8
- </a>
3
+ <!-- Logo Banner -->
4
+ <img src="https://raw.githubusercontent.com/PontaSja/image/408b34d9d8521dd22688a24d6b28db3f8ab1825a/IMG-20260710-WA0070.jpg" alt="PontaSockets Banner" width="720" style="border-radius: 12px;" />
9
5
 
10
6
  <br><br>
11
7
 
12
- <!-- Typing Animation -->
13
- <a href="https://git.io/typing-svg">
14
- <img src="https://readme-typing-svg.demolab.com?font=JetBrains+Mono&weight=700&size=24&duration=3000&pause=1000&color=00D9FF&center=true&vCenter=true&width=800&height=50&lines=Extended+from+%40whiskeysockets%2Fbaileys;🚀+Packed+with+Exclusive+Patches+%26+AI+Features;💬+Rich+Messages+%7C+Newsletter+%7C+Groups;⚡+Built+for+Speed%2C+Stability+%26+Scale" alt="Typing Animation" />
15
- </a>
8
+ <!-- Welcome Text -->
9
+ <h2>
10
+ <img src="https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Hand%20gestures/Waving%20Hand.png" alt="Waving Hand" width="35" style="vertical-align: middle; margin-right: 8px;" />
11
+ Selamat Datang di Baileys PontaLabs
12
+ </h2>
16
13
 
17
14
  <br>
18
15
 
19
- <!-- Animated Badges -->
20
- <p>
21
- <a href="https://www.npmjs.com/package/@pontalabs/baileys">
22
- <img src="https://img.shields.io/npm/v/@pontalabs/baileys?style=for-the-badge&color=cb3837&label=npm&logo=npm&logoColor=white" alt="NPM Version" />
23
- </a>
24
- <a href="https://nodejs.org">
25
- <img src="https://img.shields.io/badge/node-%3E%3D18.x-339933?style=for-the-badge&logo=node.js&logoColor=white" alt="Node.js" />
26
- </a>
27
- <a href="./LICENSE">
28
- <img src="https://img.shields.io/badge/license-Non--Commercial-orange?style=for-the-badge" alt="License" />
29
- </a>
30
- <a href="https://github.com/WhiskeySockets/Baileys">
31
- <img src="https://img.shields.io/badge/fork-whiskeysockets%2Fbaileys-6e5494?style=for-the-badge&logo=github" alt="Fork" />
32
- </a>
33
- </p>
34
-
35
- <!-- Animated Stats / Divider -->
36
- <img src="https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png" width="100%" />
37
-
38
- <p><em>Extended from <code>@whiskeysockets/baileys</code> — packed with exclusive patches, AI-rich messages, and advanced WhatsApp features.</em></p>
39
-
40
- <!-- Visitor + Animated Wave -->
41
- <img src="https://komarev.com/ghpvc/?username=PontaSja&label=Views&color=00D9FF&style=for-the-badge" alt="Views" />
42
- <img src="https://img.shields.io/github/stars/PontaSja/baileys?color=FFD700&style=for-the-badge&logo=github" alt="Stars" />
43
-
44
- </div>
45
-
46
- <br>
16
+ <!-- Badges -->
17
+ <a href="https://www.npmjs.com/package/@pontalabs/baileys">
18
+ <img src="https://img.shields.io/npm/v/@pontalabs/baileys?style=flat-square&amp;color=cb3837&amp;label=npm&amp;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&amp;logo=node.js&amp;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&amp;logo=github" alt="Fork" />
28
+ </a>
47
29
 
48
- <div align="center">
30
+ <br><br>
49
31
 
50
- ### ⚡ Quick Navigation ⚡
51
- `Installation` • `Quick Start` • `Rich Messages` • `Newsletter` • `Groups`
32
+ <p><em>Extended from <code>@whiskeysockets/baileys</code> — packed with exclusive patches, AI-rich messages, and advanced WhatsApp features.</em></p>
52
33
 
53
34
  </div>
54
35
 
55
36
  ---
56
37
 
57
- ## <img src="https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Objects/Bookmark.png" width="30" /> Table of Contents
38
+ ## 📑 Table of Contents
58
39
 
59
40
  - [Why This Fork?](#-why-this-fork)
60
41
  - [Features](#-features)
@@ -75,20 +56,8 @@
75
56
 
76
57
  ---
77
58
 
78
- <div align="center">
79
- <img src="https://raw.githubusercontent.com/platane/snk/output/github-contribution-grid-snake-dark.svg" alt="Snake animation" width="100%"/>
80
- </div>
81
-
82
- ---
83
-
84
59
  <details>
85
- <summary><h2>📥 Installation <img src="https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Objects/Inbox%20Tray.png" width="28" /></h2></summary>
86
-
87
- <br>
88
-
89
- <div align="center">
90
- <img src="https://readme-typing-svg.demolab.com?font=Fira+Code&size=18&pause=1000&color=00D9FF&center=true&width=600&lines=npm+install+%40pontalabs%2Fbaileys" alt="install" />
91
- </div>
60
+ <summary><h2>📥 Installation</h2></summary>
92
61
 
93
62
  ```bash
94
63
  # npm
@@ -96,12 +65,6 @@ npm install @pontalabs/baileys
96
65
 
97
66
  # yarn
98
67
  yarn add @pontalabs/baileys
99
-
100
- # pnpm
101
- pnpm add @pontalabs/baileys
102
-
103
- # bun
104
- bun add @pontalabs/baileys
105
68
  ```
106
69
 
107
70
  </details>
@@ -109,9 +72,7 @@ bun add @pontalabs/baileys
109
72
  ---
110
73
 
111
74
  <details>
112
- <summary><h2>🚀 Quick Start <img src="https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Travel%20and%20places/Rocket.png" width="28" /></h2></summary>
113
-
114
- <br>
75
+ <summary><h2>🚀 Quick Start</h2></summary>
115
76
 
116
77
  ```js
117
78
  import makeWASocket, { useMultiFileAuthState } from '@pontalabs/baileys'
@@ -134,15 +95,13 @@ async function start() {
134
95
  start()
135
96
  ```
136
97
 
137
- > <img src="https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Symbols/Bubbles.png" width="20" /> **Tip:** Gunakan `printQRInTerminal: true` untuk scan QR langsung di terminal!
138
-
139
98
  </details>
140
99
 
141
100
  ---
142
101
 
143
102
  ## 📖 Documentation
144
103
 
145
- ### <img src="https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Objects/Electric%20Plug.png" width="25" /> Connecting
104
+ ### 🔌 Connecting
146
105
 
147
106
  <details>
148
107
  <summary><b>🔗 QR Code</b></summary>
@@ -298,126 +257,471 @@ await sock.sendMessage(jid, {
298
257
  await sock.sendMessage(jid, {
299
258
  location: {
300
259
  degreesLatitude: 37.422,
301
- degreesLongitude: -122.084
260
+ degreesLongitude: -122.084,
261
+ name: 'Google HQ'
302
262
  }
303
263
  })
304
264
  ```
305
265
  </details>
306
266
 
307
267
  <details>
308
- <summary><b>📄 Document</b></summary>
268
+ <summary><b>💥 React</b></summary>
309
269
 
310
270
  ```js
311
- await sock.sendMessage(jid, {
312
- document: fs.readFileSync('file.pdf'),
313
- mimetype: 'application/pdf',
314
- fileName: 'myfile.pdf'
315
- })
271
+ await sock.sendMessage(jid, { react: { text: '👍', key: message.key } })
272
+ // Remove reaction
273
+ await sock.sendMessage(jid, { react: { text: '', key: message.key } })
316
274
  ```
317
275
  </details>
318
276
 
319
277
  <details>
320
- <summary><b>😆 Reaction</b></summary>
278
+ <summary><b>📊 Poll</b></summary>
321
279
 
322
280
  ```js
323
281
  await sock.sendMessage(jid, {
324
- react: {
325
- text: '🔥',
326
- key: message.key
282
+ poll: {
283
+ name: 'Pilih salah satu',
284
+ values: ['Opsi A', 'Opsi B', 'Opsi C'],
285
+ selectableCount: 1 // 0 = boleh pilih banyak
286
+ }
287
+ })
288
+
289
+ // Poll dengan fitur tambahan
290
+ await sock.sendMessage(jid, {
291
+ poll: {
292
+ name: 'Nama Poll',
293
+ values: ['Opsi A', 'Opsi B'],
294
+ selectableCount: 1,
295
+ endDate: new Date('2025-12-31'),
296
+ hideVoter: true,
297
+ canAddOption: false,
298
+ toAnnouncementGroup: false
299
+ }
300
+ })
301
+
302
+ // Quiz (Poll dengan jawaban benar)
303
+ await sock.sendMessage(jid, {
304
+ poll: {
305
+ name: 'Ibu kota Indonesia?',
306
+ values: ['Jakarta', 'Surabaya', 'Bandung'],
307
+ selectableCount: 1,
308
+ pollType: 1, // 1 = QUIZ
309
+ correctAnswer: 'Jakarta'
327
310
  }
328
311
  })
329
312
  ```
330
313
  </details>
331
314
 
332
315
  <details>
333
- <summary><b>📊 Poll</b></summary>
316
+ <summary><b>📸 Album</b></summary>
317
+
318
+ ```js
319
+ await sock.sendAlbumMessage(jid, [
320
+ { image: { url: 'https://example.com/1.jpg' }, caption: 'First' },
321
+ { video: { url: 'https://example.com/clip.mp4' }, caption: 'Second' }
322
+ ], { quoted: message, delay: 3000 })
323
+ ```
324
+ </details>
325
+
326
+ <details>
327
+ <summary><b>📆 Event</b></summary>
334
328
 
335
329
  ```js
336
330
  await sock.sendMessage(jid, {
337
- poll: {
338
- name: 'Favorite Programming Language?',
339
- values: ['JavaScript', 'Python', 'Go'],
340
- selectableCount: 1
331
+ event: {
332
+ name: 'Nama Acara',
333
+ description: 'Deskripsi',
334
+ startDate: new Date('2026-12-01T10:00:00'),
335
+ endDate: new Date('2026-12-01T12:00:00'),
336
+ location: {
337
+ degreesLatitude: -6.2088,
338
+ degreesLongitude: 106.8456,
339
+ name: 'Monas, Jakarta'
340
+ },
341
+ extraGuestsAllowed: true
342
+ }
343
+ })
344
+
345
+ // Event dengan scheduled call
346
+ await sock.sendMessage(jid, {
347
+ event: {
348
+ name: 'Meeting Online',
349
+ startDate: new Date('2026-12-01T10:00:00'),
350
+ call: 'audio', // 'audio' | 'video'
351
+ isScheduleCall: true
341
352
  }
342
353
  })
343
354
  ```
344
355
  </details>
345
356
 
346
- ---
357
+ <details>
358
+ <summary><b>👨‍💻 Interactive (Native Flow & Carousel)</b></summary>
347
359
 
348
- ### <img src="https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Activities/Sparkles.png" width="25" /> Rich Messages
360
+ ```js
361
+ // Native Flow
362
+ await sock.sendMessage(jid, {
363
+ text: 'Choose an option:',
364
+ title: 'Title',
365
+ footer: '© PontaLabs Baileys',
366
+ interactive: [{
367
+ name: 'quick_reply',
368
+ buttonParamsJson: JSON.stringify({ display_text: 'Quick Reply', id: '123' })
369
+ }]
370
+ })
349
371
 
350
- > <img src="https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Objects/Light%20Bulb.png" width="20" /> Semua fitur **Rich Message** dikirim melalui `sock.sendMessage()` dan dirender sebagai AI bot message di WhatsApp.
351
- >
352
- > **Tidak ada daftar `build.*` terpisah.** Builder, shortcut lama, `items`, `richResponse`, HTML WebView, interactive builder, dan opsi terkait semuanya didokumentasikan di bagian ini supaya API Rich tetap berada di satu tempat.
372
+ // Carousel
373
+ await sock.sendMessage(jid, {
374
+ text: 'Check out our collection!',
375
+ title: 'Catalog',
376
+ footer: '© PontaLabs Baileys',
377
+ cards: [{
378
+ image: { url: 'https://example.com/image.jpg' },
379
+ title: 'Product Name',
380
+ body: 'Product description',
381
+ footer: '© PontaLabs',
382
+ buttons: [{
383
+ name: 'quick_reply',
384
+ buttonParamsJson: JSON.stringify({ display_text: 'Select', id: '1' })
385
+ }]
386
+ }]
387
+ })
388
+ ```
389
+ </details>
390
+
391
+ <details>
392
+ <summary><b>🤖 listMessage</b></summary>
393
+
394
+ ```js
395
+ sock.sendMessage(jid, {
396
+ text: "Halo kak, pilih menu dibawah ya",
397
+ footer: "@PontaLabs",
398
+ title: "Menu Utama",
399
+ buttonText: "Buka Menu",
400
+ sections: [
401
+ {
402
+ title: "Menu",
403
+ rows: [
404
+ {
405
+ title: "Info Bot",
406
+ description: "Cek info bot",
407
+ rowId: ".info"
408
+ },
409
+ {
410
+ title: "Owner",
411
+ description: "Hubungi owner",
412
+ rowId: ".owner"
413
+ },
414
+ {
415
+ title: "Donasi",
416
+ description: "Donasi seikhlasnya",
417
+ rowId: ".donasi"
418
+ }
419
+ ]
420
+ }
421
+ ]
422
+ }, { quoted: message })
423
+ ```
424
+ </details>
353
425
 
354
426
  <details>
355
- <summary><b>📌 Quick Start — Rich Message <img src="https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Symbols/Double%20Exclamation%20Mark.png" width="20" /></b></summary>
427
+ <summary><b>🔩 Raw / Legacy Buttons</b></summary>
428
+
429
+ > Varian tombol raw/proto WhatsApp mentah — lebih fleksibel, tapi kamu yang susun strukturnya sendiri.
430
+
431
+ #### `buttonsMessage`
432
+
433
+ Kirim objek `buttonsMessage` proto WhatsApp mentah — thumbnail lokasi di dalamnya otomatis diproses kalau berupa Buffer/URL/path.
356
434
 
357
435
  ```js
358
436
  await sock.sendMessage(jid, {
359
- richText: 'Halo! 👋'
437
+ buttonsMessage: {
438
+ contentText: 'Pilih salah satu:',
439
+ footerText: '© PontaCT',
440
+ buttons: [
441
+ { buttonId: 'a', buttonText: { displayText: 'Opsi A' }, type: 1 },
442
+ { buttonId: 'b', buttonText: { displayText: 'Opsi B' }, type: 1 }
443
+ ]
444
+ }
360
445
  }, { quoted: message })
361
446
  ```
362
447
 
363
- Builder `build.*` hanya membuat payload. Pengiriman tetap melalui `sock.sendMessage()`:
448
+ #### `templateButtons`
364
449
 
365
450
  ```js
366
451
  await sock.sendMessage(jid, {
367
- items: [
368
- build.richText('Halo! 👋'),
369
- build.richTip('Dikirim dari PontaLabs')
452
+ text: 'Butuh bantuan?',
453
+ footer: '© PontaCT',
454
+ templateButtons: [
455
+ { index: 1, urlButton: { displayText: 'Kunjungi Website', url: 'https://example.com' } },
456
+ { index: 2, callButton: { displayText: 'Telepon', phoneNumber: '+6281234567890' } }
370
457
  ]
458
+ }, { quoted: message })
459
+ ```
460
+
461
+ #### `interactiveButtons`
462
+
463
+ ```js
464
+ await sock.sendMessage(jid, {
465
+ title: 'Menu Utama',
466
+ subtitle: 'Silakan pilih',
467
+ text: 'Ada yang bisa dibantu?',
468
+ footer: '© PontaCT',
469
+ interactiveButtons: [
470
+ { name: 'quick_reply', buttonParamsJson: JSON.stringify({ display_text: 'Mulai', id: 'start' }) }
471
+ ]
472
+ }, { quoted: message })
473
+ ```
474
+
475
+ </details>
476
+
477
+ <details>
478
+ <summary><b>📌 Pin & Keep</b></summary>
479
+
480
+ ```js
481
+ // Pin — 24h = 86400 · 7d = 604800 · 30d = 2592000
482
+ await sock.sendMessage(jid, { pin: { type: 1, time: 86400, key: message.key } })
483
+
484
+ // Keep
485
+ await sock.sendMessage(jid, { keep: { key: message.key, type: 1 } })
486
+ ```
487
+ </details>
488
+
489
+ ---
490
+
491
+ ### 📍 Location + Buttons
492
+
493
+ > Location message with native list menu (`single_select`) and extra buttons — all in one `buttonsMessage`.
494
+
495
+ <details>
496
+ <summary><b>Location + List Menu</b></summary>
497
+
498
+ ```js
499
+ await sock.sendMessage(jid, {
500
+ buttonLocation: {
501
+ latitude: -6.2088,
502
+ longitude: 106.8456,
503
+ name: 'Kantor Pusat PontaCT',
504
+ address: 'Jl. Sudirman No. 1, Jakarta Pusat',
505
+ text: 'Temukan kami di sini:',
506
+ footer: '© PontaCT',
507
+ thumbnail: 'https://example.com/map-preview.jpg',
508
+ listButtonText: 'Pilih Layanan',
509
+ listSectionTitle: 'Layanan Tersedia',
510
+ listMenu: [
511
+ { title: 'Customer Service', description: 'Lantai 1, Senin–Jumat 08.00–17.00', id: 'cs' },
512
+ { title: 'Kasir & Pembayaran', description: 'Lantai 2, buka setiap hari', id: 'kasir' },
513
+ { title: 'Gudang & Pengiriman', description: 'Gedung B, pintu belakang', id: 'gudang' }
514
+ ]
515
+ }
371
516
  })
372
517
  ```
518
+ </details>
373
519
 
374
- > `build` tersedia dari package dan tidak membutuhkan `sock` saat membuat payload.
520
+ <details>
521
+ <summary><b>Location + Extra Buttons</b></summary>
375
522
 
523
+ ```js
524
+ await sock.sendMessage(jid, {
525
+ buttonLocation: {
526
+ latitude: -6.2088,
527
+ longitude: 106.8456,
528
+ name: 'Toko PontaCT',
529
+ address: 'Jl. Kebon Sirih No. 10, Jakarta',
530
+ text: 'Kunjungi toko kami!',
531
+ footer: '© PontaCT',
532
+ thumbnail: 'https://example.com/store.jpg',
533
+ extraButtons: [
534
+ { id: 'call', displayText: '📞 Hubungi Kami' },
535
+ { id: 'whatsapp', displayText: '💬 WhatsApp' },
536
+ { id: 'maps', displayText: '🗺️ Buka di Maps' }
537
+ ]
538
+ }
539
+ })
540
+ ```
376
541
  </details>
377
542
 
378
543
  <details>
379
- <summary><b>📝 Rich Text — <code>richText</code></b></summary>
544
+ <summary><b>Location + List Menu + Extra Buttons</b></summary>
545
+
546
+ ```js
547
+ await sock.sendMessage(jid, {
548
+ buttonLocation: {
549
+ latitude: -6.2088,
550
+ longitude: 106.8456,
551
+ name: 'Plaza PontaCT',
552
+ address: 'Jl. MH Thamrin No. 5, Jakarta',
553
+ text: 'Selamat datang di pusat layanan kami.',
554
+ footer: 'Buka setiap hari 09.00–21.00',
555
+ thumbnail: 'https://example.com/plaza.jpg',
556
+ listButtonText: 'Pilih Tujuan',
557
+ listSectionTitle: 'Area Tersedia',
558
+ listMenu: [
559
+ { title: 'Food Court', description: 'Lt. 1 — lebih dari 30 tenant', id: 'food' },
560
+ { title: 'Cinema', description: 'Lt. 4 — 8 studio', id: 'cinema' },
561
+ { title: 'Customer Care', description: 'Lt. 2 — sebelah eskalator', id: 'care' }
562
+ ],
563
+ extraButtons: [
564
+ { id: 'navigate', displayText: '🧭 Navigasi' },
565
+ { id: 'promo', displayText: '🎁 Promo Hari Ini' }
566
+ ]
567
+ }
568
+ })
569
+ ```
570
+ </details>
380
571
 
381
- Rich markdown text yang dirender sebagai `GenAIMarkdownTextUXPrimitive`.
572
+ <details>
573
+ <summary><b>📋 Fields Reference</b></summary>
382
574
 
383
- **Direct:**
575
+ | Field | Type | Required | Default | Description |
576
+ |:---|:---|:---:|:---|:---|
577
+ | `latitude` | `number` | — | `0` | Latitude coordinate |
578
+ | `longitude` | `number` | — | `0` | Longitude coordinate |
579
+ | `name` | `string` | — | `'Location'` | Place name |
580
+ | `address` | `string` | — | `''` | Text address |
581
+ | `text` | `string` | — | `''` | Message body text |
582
+ | `footer` | `string` | — | `''` | Footer text |
583
+ | `thumbnail` | `Buffer / URL / path` | ✅ | — | Map preview image |
584
+ | `listButtonText` | `string` | — | `'Pilih Menu'` | List button label |
585
+ | `listSectionTitle` | `string` | — | `'Pilihan'` | List section title |
586
+ | `listMenu` | `array` | — | — | Menu rows |
587
+ | `extraButtons` | `array` | — | — | Extra buttons |
588
+
589
+ </details>
590
+
591
+ ---
592
+
593
+ ### 📦 Order Status
594
+
595
+ > Interactive order tracking card using native `order_status` flow button.
596
+
597
+ <details>
598
+ <summary><b>Basic Order Status</b></summary>
384
599
 
385
600
  ```js
386
601
  await sock.sendMessage(jid, {
387
- richText: '*Halo!* Ini rich text dari bot.\nStatus: `success`\nWaktu: _120ms_'
388
- }, { quoted: message })
602
+ orderStatus: {
603
+ image: 'https://example.com/order-banner.jpg',
604
+ title: 'Status Pesanan',
605
+ text: 'Pesanan kamu sedang diproses oleh penjual.',
606
+ referenceId: 'ORD-20250629-001',
607
+ status: 'PROCESSING',
608
+ currency: 'IDR'
609
+ }
610
+ })
389
611
  ```
612
+ </details>
390
613
 
391
- **Array / beberapa paragraf:**
614
+ <details>
615
+ <summary><b>Full Order Status with Total & Tax</b></summary>
392
616
 
393
617
  ```js
394
618
  await sock.sendMessage(jid, {
395
- richText: [
396
- 'Baris pertama.',
397
- 'Baris kedua.',
398
- 'Baris ketiga.'
399
- ]
400
- }, { quoted: message })
619
+ orderStatus: {
620
+ image: 'https://example.com/order.jpg',
621
+ title: 'Update Pesanan #ORD-2025-001',
622
+ text: 'Pesananmu sedang dalam perjalanan! 🚚',
623
+ footer: 'Estimasi tiba: 2–3 hari kerja',
624
+ referenceId: 'ORD-2025-001',
625
+ status: 'SHIPPED',
626
+ subtotalValue: 15000000,
627
+ subtotalOffset: 100,
628
+ taxValue: 1500000,
629
+ taxOffset: 100,
630
+ currency: 'IDR'
631
+ }
632
+ })
401
633
  ```
634
+ </details>
402
635
 
403
- **Builder:**
636
+ <details>
637
+ <summary><b>Local Image File</b></summary>
404
638
 
405
639
  ```js
640
+ const fs = require('fs')
406
641
  await sock.sendMessage(jid, {
407
- items: [
408
- build.richText('Halo! 👋')
409
- ]
642
+ orderStatus: {
643
+ image: fs.readFileSync('./assets/order-confirm.jpg'),
644
+ title: 'Pesanan Dikonfirmasi ✅',
645
+ text: 'Terima kasih telah berbelanja!',
646
+ referenceId: 'ORD-LOCAL-001',
647
+ status: 'PROCESSING',
648
+ currency: 'IDR'
649
+ }
410
650
  })
411
651
  ```
652
+ </details>
653
+
654
+ <details>
655
+ <summary><b>📋 Fields Reference</b></summary>
656
+
657
+ | Field | Type | Required | Default | Description |
658
+ |:---|:---|:---:|:---|:---|
659
+ | `image` | `Buffer / URL / path` | ✅ | — | Header card image |
660
+ | `title` | `string` | — | `'Order Status'` | Header title |
661
+ | `text` | `string` | — | `'Silakan cek status pesanan Anda.'` | Body text |
662
+ | `footer` | `string` | — | `'Powered by PontaCT'` | Footer text |
663
+ | `referenceId` | `string` | — | `'PT-001'` | Order reference ID |
664
+ | `status` | `string` | — | `'PROCESSING'` | Order status |
665
+ | `subtotalValue` | `number` | — | `0` | Subtotal value (in offset units) |
666
+ | `subtotalOffset` | `number` | — | `100` | Value divider |
667
+ | `taxValue` | `number` | — | `0` | Tax value |
668
+ | `taxOffset` | `number` | — | `100` | Tax divider |
669
+ | `currency` | `string` | — | `'IDR'` | Currency code |
670
+
671
+ > **Status values:** `PROCESSING` · `SHIPPED` · `DELIVERED` · `CANCELLED` · `REFUNDED`
412
672
 
413
673
  </details>
414
674
 
675
+ ---
676
+
677
+ ### 🤖 Rich Messages
678
+
679
+ > 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.
680
+
681
+ **Quick jump:** [Rich Text](#rich-text) · [Code](#rich-code-block) · [Table](#rich-table) · [Images](#rich-images) · [Video](#rich-video) · [Suggestions](#rich-suggestions) · [LaTeX](#rich-latex) · [Product](#rich-product) · [Post](#rich-post) · [Reels](#rich-reels) · [Sources](#rich-sources) · [Tip & Footer](#rich-tip--footer) · [Mixed](#rich-mixed) · [Response](#rich-response)
682
+
683
+ ---
684
+
685
+ #### 📝 Rich Text
686
+
687
+ > AI bot-styled markdown text rendered in `richResponseMessage`.
688
+
415
689
  <details>
416
- <summary><b>🌐 Rich HTML WebView — <code>richHtml</code></b></summary>
690
+ <summary><b>Simple Text</b></summary>
691
+
692
+ ```js
693
+ await sock.sendMessage(jid, { richText: 'Halo! Ini pesan dari bot.' }, { quoted: message })
694
+ ```
695
+ </details>
696
+
697
+ <details>
698
+ <summary><b>Markdown (bold, italic, inline code)</b></summary>
699
+
700
+ ```js
701
+ await sock.sendMessage(jid, {
702
+ richText: '*Hasil eksekusi:*\nStatus: `success`\nWaktu: _120ms_'
703
+ }, { quoted: message })
704
+ ```
705
+ </details>
706
+
707
+ <details>
708
+ <summary><b>Multiple Paragraphs (Array)</b></summary>
709
+
710
+ ```js
711
+ await sock.sendMessage(jid, {
712
+ richText: ['Baris pertama.', 'Baris kedua.', 'Baris ketiga.']
713
+ }, { quoted: message })
714
+ ```
715
+ </details>
417
716
 
418
- Mengirim HTML langsung ke primitive `GenAIaeacdsnwHtmlPrimitive`.
717
+ ---
718
+
719
+ #### 📝 Rich Html
419
720
 
420
- **Direct `sendMessage`:**
721
+ > AI html rendered in `GenAIaeacdsnwHtmlPrimitive`.
722
+
723
+ <details>
724
+ <summary><b>Simple Html</b></summary>
421
725
 
422
726
  ```js
423
727
  const html = `<!DOCTYPE html>
@@ -437,91 +741,67 @@ await sock.sendMessage(jid, {
437
741
  richHtml: html
438
742
  }, { quoted: message })
439
743
  ```
744
+ </details>
440
745
 
441
- **Builder:**
442
-
443
- ```js
444
- await sock.sendMessage(jid, {
445
- items: [
446
- build.richHtml(html)
447
- ]
448
- })
449
- ```
450
-
451
- **Raw item:**
452
-
453
- ```js
454
- await sock.sendMessage(jid, {
455
- items: [
456
- { html: html }
457
- ]
458
- })
459
- ```
746
+ ---
460
747
 
461
- > HTML berjalan di sisi client/webview. Gunakan HTML/JavaScript yang kamu kontrol dan sesuaikan dengan dukungan client WhatsApp yang dituju.
748
+ #### 💻 Rich Code Block
462
749
 
463
- </details>
750
+ > Syntax-highlighted code. Use `code` for single block, `codes` for multiple.
464
751
 
465
752
  <details>
466
- <summary><b>👤 Rich Card — <code>richCard</code></b></summary>
467
-
468
- Entity card / profile preview yang dirender sebagai AI message. Cocok untuk menampilkan kontak, channel, atau brand profile tanpa perlu builder terpisah.
469
-
470
- **Direct `sendMessage`:**
753
+ <summary><b>Single Block</b></summary>
471
754
 
472
755
  ```js
473
756
  await sock.sendMessage(jid, {
474
- richCard: {
475
- thumbnail_url: 'https://example.com/profile.jpg',
476
- verification: true,
477
- title: 'PontaLabs',
478
- subtitle: 'Official Channel',
479
- description: 'WhatsApp Bot Framework by PontaLabs',
480
- entity_id: '62123456789',
481
- entity_url: 'https://wa.me/62123456789',
482
- profile_url: 'https://example.com/profile.jpg'
483
- }
757
+ code: 'console.log("Hello World")',
758
+ language: 'javascript'
484
759
  }, { quoted: message })
485
760
  ```
761
+ </details>
486
762
 
487
- **Builder:**
763
+ <details>
764
+ <summary><b>Multiple Blocks</b></summary>
488
765
 
489
766
  ```js
490
767
  await sock.sendMessage(jid, {
491
- items: [
492
- build.richCard({
493
- thumbnail_url: 'https://example.com/profile.jpg',
494
- verification: true,
495
- title: 'PontaLabs',
496
- subtitle: 'Official Channel',
497
- description: 'WhatsApp Bot Framework by PontaLabs',
498
- entity_id: '62123456789',
499
- entity_url: 'https://wa.me/62123456789',
500
- profile_url: 'https://example.com/profile.jpg'
501
- })
768
+ codes: [
769
+ { code: 'SELECT * FROM users WHERE id = 1;', language: 'sql' },
770
+ { code: '{ "id": 1, "name": "Ponta", "role": "admin" }', language: 'json' }
502
771
  ]
503
- })
772
+ }, { quoted: message })
504
773
  ```
774
+ </details>
505
775
 
506
- | Property | Type | Required | Description |
507
- |:---|:---|:---:|:---|
508
- | `thumbnail_url` | `string` | — | URL thumbnail publik untuk card |
509
- | `verification` | `boolean` | — | Menampilkan badge verified |
510
- | `title` | `string` | ✅ | Judul utama entity |
511
- | `subtitle` | `string` | — | Subjudul / role / tagline |
512
- | `description` | `string` | — | Deskripsi singkat entity |
513
- | `entity_id` | `string` | ✅ | ID / nomor WhatsApp entity |
514
- | `entity_url` | `string` | — | URL tujuan saat card diklik |
515
- | `profile_url` | `string` | — | Fallback URL untuk avatar / profile |
776
+ <details>
777
+ <summary><b>Supported Languages</b></summary>
516
778
 
517
- > Gunakan URL thumbnail yang valid dan dapat diakses publik. `entity_id` harus dalam format nomor internasional tanpa `+`.
779
+ | Language | Key |
780
+ |:---|:---|
781
+ | JavaScript | `javascript` · `js` |
782
+ | TypeScript | `typescript` · `ts` |
783
+ | Python | `python` · `py` |
784
+ | Bash / Shell | `bash` · `sh` · `zsh` |
785
+ | Go | `go` · `golang` |
786
+ | Rust | `rust` · `rs` |
787
+ | C / C++ | `c` · `h` · `cpp` · `c++` |
788
+ | C# | `csharp` · `cs` |
789
+ | CSS / HTML | `css` · `html` |
790
+ | PowerShell / CMD | `powershell` · `ps1` · `cmd` · `bat` |
791
+ | SQL / JSON | `sql` · `json` |
518
792
 
519
793
  </details>
520
794
 
521
- <details>
522
- <summary><b>📊 Rich Table — <code>table</code> / <code>richTable</code></b></summary>
795
+ ---
796
+
797
+ #### 📊 Rich Table
523
798
 
524
- **Top-level:**
799
+ > Structured table with `title`, `headers`, and `rows`.
800
+ >
801
+ > ⚠️ 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).
802
+
803
+ <details>
804
+ <summary><b>Simple Table</b></summary>
525
805
 
526
806
  ```js
527
807
  await sock.sendMessage(jid, {
@@ -536,37 +816,57 @@ await sock.sendMessage(jid, {
536
816
  }
537
817
  }, { quoted: message })
538
818
  ```
819
+ </details>
539
820
 
540
- **Builder:**
821
+ <details>
822
+ <summary><b>Table without Title</b></summary>
541
823
 
542
824
  ```js
543
825
  await sock.sendMessage(jid, {
544
- items: [
545
- build.richTable([
546
- ['Name', 'Role'],
547
- ['Ponta', 'Admin'],
548
- ['Yue', 'Member']
549
- ])
550
- ]
551
- })
826
+ table: {
827
+ headers: ['Command', 'Description'],
828
+ rows: [
829
+ ['.ping', 'Cek latency bot'],
830
+ ['.info', 'Info bot'],
831
+ ['.help', 'List semua command']
832
+ ]
833
+ }
834
+ }, { quoted: message })
552
835
  ```
553
-
554
- > Untuk `richResponse`, format `table` berbeda: gunakan array baris siap-pakai seperti `{ items: [...], isHeading }`, bukan `{ headers, rows }`.
555
-
556
836
  </details>
557
837
 
558
838
  <details>
559
- <summary><b>🖼️ Rich Images — <code>richImages</code> / <code>richImage</code></b></summary>
560
-
561
- **Single image:**
839
+ <summary><b>Data Only (no header)</b></summary>
562
840
 
563
841
  ```js
564
842
  await sock.sendMessage(jid, {
565
- richImages: 'https://example.com/photo.jpg'
843
+ table: {
844
+ rows: [
845
+ ['RAM', '512 MB'],
846
+ ['CPU', '4 Core'],
847
+ ['Uptime', '99.9%']
848
+ ]
849
+ }
566
850
  }, { quoted: message })
567
851
  ```
852
+ </details>
568
853
 
569
- **Multiple images:**
854
+ ---
855
+
856
+ #### 🖼️ Rich Images
857
+
858
+ > AI image grid. Single URL = single image, multiple URLs = carousel.
859
+
860
+ <details>
861
+ <summary><b>Single Image</b></summary>
862
+
863
+ ```js
864
+ await sock.sendMessage(jid, { richImages: 'https://example.com/photo.jpg' }, { quoted: message })
865
+ ```
866
+ </details>
867
+
868
+ <details>
869
+ <summary><b>Multiple Images (Grid)</b></summary>
570
870
 
571
871
  ```js
572
872
  await sock.sendMessage(jid, {
@@ -577,156 +877,252 @@ await sock.sendMessage(jid, {
577
877
  ]
578
878
  }, { quoted: message })
579
879
  ```
880
+ </details>
580
881
 
581
- **Builder:**
882
+ <details>
883
+ <summary><b>Inside items / richResponse</b></summary>
582
884
 
583
885
  ```js
886
+ // items
584
887
  await sock.sendMessage(jid, {
585
888
  items: [
586
- build.richImage('https://example.com/photo.jpg')
889
+ { text: 'Hasil foto hari ini:' },
890
+ { images: ['https://example.com/1.jpg', 'https://example.com/2.jpg'] }
587
891
  ]
588
- })
589
- ```
892
+ }, { quoted: message })
590
893
 
894
+ // richResponse
895
+ await sock.sendMessage(jid, {
896
+ richResponse: [
897
+ { text: 'Lihat gambarnya:' },
898
+ { images: 'https://example.com/banner.jpg' }
899
+ ]
900
+ }, { quoted: message })
901
+ ```
591
902
  </details>
592
903
 
593
- <details>
594
- <summary><b>🎥 Rich Video — <code>richVideo</code> / <code>richVideo</code> builder</b></summary>
904
+ ---
905
+
906
+ #### 🎥 Rich Video
907
+
908
+ > Video embed as AI animated media (`GenAIImaginePrimitive` with `imagine_type: ANIMATE`).
595
909
 
596
- **Shorthand:**
910
+ <details>
911
+ <summary><b>Shorthand URL</b></summary>
597
912
 
598
913
  ```js
599
- await sock.sendMessage(jid, {
600
- richVideo: 'https://example.com/clip.mp4'
601
- }, { quoted: message })
914
+ await sock.sendMessage(jid, { richVideo: 'https://example.com/clip.mp4' }, { quoted: message })
602
915
  ```
916
+ </details>
603
917
 
604
- **Full options:**
918
+ <details>
919
+ <summary><b>Full Options</b></summary>
605
920
 
606
921
  ```js
607
922
  await sock.sendMessage(jid, {
608
923
  richVideo: {
609
924
  url: 'https://example.com/clip.mp4',
610
- mimeType: 'video/mp4',
611
- duration: 15,
612
- fallbackText: 'Preview video'
925
+ mimeType: 'video/mp4', // default: 'video/mp4'
926
+ duration: 15, // seconds, default: 10
927
+ fallbackText: 'Preview video' // default: '[ VIDEO - PontaCT ]'
613
928
  }
614
929
  }, { quoted: message })
615
930
  ```
931
+ </details>
616
932
 
617
- **Builder:**
933
+ <details>
934
+ <summary><b>Inside items / richResponse</b></summary>
618
935
 
619
936
  ```js
937
+ // items
620
938
  await sock.sendMessage(jid, {
621
939
  items: [
622
- build.richVideo('https://example.com/clip.mp4')
940
+ { text: 'Cek videonya:' },
941
+ { videoUrl: 'https://example.com/clip.mp4', duration: 20 }
623
942
  ]
624
- })
625
- ```
943
+ }, { quoted: message })
626
944
 
945
+ // richResponse
946
+ await sock.sendMessage(jid, {
947
+ richResponse: [
948
+ { text: 'Tutorial:' },
949
+ { video: { url: 'https://example.com/tutorial.mp4', duration: 30 } }
950
+ ]
951
+ }, { quoted: message })
952
+ ```
627
953
  </details>
628
954
 
629
- <details>
630
- <summary><b>💡 Rich Suggestions — <code>richSuggestions</code> / <code>richSuggest</code></b></summary>
955
+ ---
956
+
957
+ #### 💡 Rich Suggestions
958
+
959
+ > Follow-up prompt pills — like native AI chat buttons.
631
960
 
632
- **Direct:**
961
+ <details>
962
+ <summary><b>Shorthand</b></summary>
633
963
 
634
964
  ```js
635
965
  await sock.sendMessage(jid, {
636
966
  richSuggestions: ['Coba lagi', 'Lihat detail', 'Batalkan']
637
967
  }, { quoted: message })
638
968
  ```
969
+ </details>
639
970
 
640
- **Builder:**
971
+ <details>
972
+ <summary><b>Inside items / richResponse</b></summary>
641
973
 
642
974
  ```js
975
+ // items
643
976
  await sock.sendMessage(jid, {
644
977
  items: [
645
- build.richSuggest('Lihat detail')
978
+ { text: 'Mau lanjut ke mana?' },
979
+ { suggestions: ['Halaman utama', 'Bantuan', 'Hubungi admin'] }
646
980
  ]
647
- })
981
+ }, { quoted: message })
982
+
983
+ // richResponse
984
+ await sock.sendMessage(jid, {
985
+ richResponse: [
986
+ { text: 'Hasil pencarian ditemukan.' },
987
+ { suggestions: ['Tampilkan semua', 'Filter ulang', 'Export'] }
988
+ ]
989
+ }, { quoted: message })
648
990
  ```
991
+ </details>
992
+
993
+ ---
994
+
995
+ #### 🔣 Rich LaTeX
649
996
 
650
- </details>
997
+ > Math formula rendering as `GenAILatexItem` inline entity. `url` points to a rendered formula image (PNG/JPG from external LaTeX renderer).
651
998
 
652
999
  <details>
653
- <summary><b>🔣 Rich LaTeX — <code>richLatex</code></b></summary>
654
-
655
- **Shorthand URL:**
1000
+ <summary><b>Shorthand URL</b></summary>
656
1001
 
657
1002
  ```js
658
1003
  await sock.sendMessage(jid, {
659
1004
  richLatex: 'https://latex.codecogs.com/png.latex?E%3Dmc%5E2'
660
1005
  }, { quoted: message })
661
1006
  ```
1007
+ </details>
662
1008
 
663
- **Full options:**
1009
+ <details>
1010
+ <summary><b>Full Options</b></summary>
664
1011
 
665
1012
  ```js
666
1013
  await sock.sendMessage(jid, {
667
1014
  richLatex: {
668
1015
  url: 'https://latex.codecogs.com/png.latex?E%3Dmc%5E2',
669
- text: 'E = mc²',
670
- width: 120,
671
- height: 60,
672
- font_height: 83.33,
673
- padding: 15
1016
+ text: 'E = mc²', // label & fallback
1017
+ width: 120, // default: 100
1018
+ height: 60, // default: 100
1019
+ font_height: 83.33, // default: 83.33
1020
+ padding: 15 // default: 15
674
1021
  }
675
1022
  }, { quoted: message })
676
1023
  ```
677
-
678
1024
  </details>
679
1025
 
680
1026
  <details>
681
- <summary><b>🛍️ Rich Product — <code>richProduct</code> / <code>richProduct</code> builder</b></summary>
1027
+ <summary><b>Inside items / richResponse</b></summary>
1028
+
1029
+ ```js
1030
+ // items
1031
+ await sock.sendMessage(jid, {
1032
+ items: [
1033
+ { text: 'Rumus energi kinetik:' },
1034
+ {
1035
+ latexUrl: 'https://latex.codecogs.com/png.latex?E_k%3D%5Cfrac%7B1%7D%7B2%7Dmv%5E2',
1036
+ latexText: 'Ek = ½mv²',
1037
+ latexWidth: 150,
1038
+ latexHeight: 60
1039
+ }
1040
+ ]
1041
+ }, { quoted: message })
1042
+
1043
+ // richResponse
1044
+ await sock.sendMessage(jid, {
1045
+ richResponse: [
1046
+ { text: 'Solusi integral:' },
1047
+ { latex: { url: 'https://latex.codecogs.com/png.latex?%5Cint%20x%5E2%20dx', text: '∫x² dx = x³/3 + C' } }
1048
+ ]
1049
+ }, { quoted: message })
1050
+ ```
1051
+ </details>
1052
+
1053
+ ---
1054
+
1055
+ #### 🛍️ Rich Product
682
1056
 
683
- **Single product:**
1057
+ > Product card(s) as `GenAIProductItemCardPrimitive`. Object = single card, Array = horizontal scroll carousel.
1058
+
1059
+ <details>
1060
+ <summary><b>Single Product</b></summary>
684
1061
 
685
1062
  ```js
686
1063
  await sock.sendMessage(jid, {
687
1064
  richProduct: {
688
1065
  title: 'Sepatu Adidas Samba',
689
1066
  price_display_string: 'Rp 1.200.000',
690
- description: 'Sepatu casual ikonik.',
1067
+ description: 'Sepatu casual ikonik, tersedia berbagai ukuran.',
691
1068
  retailer_id: 'adidas_store',
692
- thumbnail: {
693
- url: 'https://example.com/adidas.jpg',
694
- mime_type: 'image/jpeg',
695
- width: 300,
696
- height: 300
697
- }
1069
+ thumbnail: { url: 'https://example.com/adidas.jpg', mime_type: 'image/jpeg', width: 300, height: 300 }
698
1070
  }
699
1071
  }, { quoted: message })
700
1072
  ```
1073
+ </details>
701
1074
 
702
- **Carousel:**
1075
+ <details>
1076
+ <summary><b>Product Carousel</b></summary>
703
1077
 
704
1078
  ```js
705
1079
  await sock.sendMessage(jid, {
706
1080
  richProduct: [
707
- { title: 'Sepatu A', price_display_string: 'Rp 500.000' },
708
- { title: 'Sepatu B', price_display_string: 'Rp 750.000' }
1081
+ {
1082
+ title: 'Sepatu A',
1083
+ price_display_string: 'Rp 500.000',
1084
+ thumbnail: { url: 'https://example.com/a.jpg', mime_type: 'image/jpeg', width: 300, height: 300 }
1085
+ },
1086
+ {
1087
+ title: 'Sepatu B',
1088
+ price_display_string: 'Rp 750.000',
1089
+ thumbnail: { url: 'https://example.com/b.jpg', mime_type: 'image/jpeg', width: 300, height: 300 }
1090
+ }
709
1091
  ]
710
1092
  }, { quoted: message })
711
1093
  ```
1094
+ </details>
712
1095
 
713
- **Builder:**
1096
+ <details>
1097
+ <summary><b>Inside items / richResponse</b></summary>
714
1098
 
715
1099
  ```js
1100
+ // items
716
1101
  await sock.sendMessage(jid, {
717
1102
  items: [
718
- build.richProduct({
719
- title: 'Sepatu A',
720
- price_display_string: 'Rp 500.000'
721
- })
1103
+ { text: 'Rekomendasi produk hari ini:' },
1104
+ { product: { title: 'Produk X', price_display_string: 'Rp 99.000' } }
722
1105
  ]
723
- })
724
- ```
1106
+ }, { quoted: message })
725
1107
 
1108
+ // richResponse
1109
+ await sock.sendMessage(jid, {
1110
+ richResponse: [
1111
+ { text: 'Pilih produkmu:' },
1112
+ { product: [{ title: 'A' }, { title: 'B' }] }
1113
+ ]
1114
+ }, { quoted: message })
1115
+ ```
726
1116
  </details>
727
1117
 
1118
+ ---
1119
+
1120
+ #### 📰 Rich Post
1121
+
1122
+ > Post card(s) as `GenAIPostPrimitive`. Object = single post, Array = carousel.
1123
+
728
1124
  <details>
729
- <summary><b>📰 Rich Post — <code>richPost</code> / <code>richPost</code> builder</b></summary>
1125
+ <summary><b>Single Post</b></summary>
730
1126
 
731
1127
  ```js
732
1128
  await sock.sendMessage(jid, {
@@ -739,25 +1135,29 @@ await sock.sendMessage(jid, {
739
1135
  }
740
1136
  }, { quoted: message })
741
1137
  ```
1138
+ </details>
742
1139
 
743
- **Builder:**
1140
+ <details>
1141
+ <summary><b>Post Carousel</b></summary>
744
1142
 
745
1143
  ```js
746
1144
  await sock.sendMessage(jid, {
747
- items: [
748
- build.richPost({
749
- title: 'Post PontaLabs',
750
- author_display_name: '@pontalabs',
751
- media_url: 'https://example.com/post.jpg'
752
- })
1145
+ richPost: [
1146
+ { title: 'Post 1', author_display_name: '@user1', media_url: 'https://example.com/1.jpg' },
1147
+ { title: 'Post 2', author_display_name: '@user2', media_url: 'https://example.com/2.jpg' }
753
1148
  ]
754
- })
1149
+ }, { quoted: message })
755
1150
  ```
756
-
757
1151
  </details>
758
1152
 
1153
+ ---
1154
+
1155
+ #### 🎬 Rich Reels
1156
+
1157
+ > Reels carousel as `GenAIReelPrimitive` with `contentItemsMetadata`. Auto-injects `richResponseSourcesMetadata` with `provider: 'PontaCT'`.
1158
+
759
1159
  <details>
760
- <summary><b>🎬 Rich Reels — <code>richReels</code> / <code>richReels</code> builder</b></summary>
1160
+ <summary><b>Single Reel</b></summary>
761
1161
 
762
1162
  ```js
763
1163
  await sock.sendMessage(jid, {
@@ -775,364 +1175,328 @@ await sock.sendMessage(jid, {
775
1175
  }
776
1176
  }, { quoted: message })
777
1177
  ```
1178
+ </details>
778
1179
 
779
- **Builder:**
1180
+ <details>
1181
+ <summary><b>Reels Carousel</b></summary>
780
1182
 
781
1183
  ```js
782
1184
  await sock.sendMessage(jid, {
783
- items: [
784
- build.richReels([{
785
- title: '@creator',
786
- thumbnailUrl: 'https://example.com/thumb.jpg',
787
- videoUrl: 'https://example.com/reel.mp4'
788
- }])
1185
+ richReels: [
1186
+ {
1187
+ title: '@creator1',
1188
+ profileIconUrl: 'https://example.com/av1.jpg',
1189
+ thumbnailUrl: 'https://example.com/th1.jpg',
1190
+ videoUrl: 'https://example.com/r1.mp4',
1191
+ likes_count: 5000,
1192
+ reel_source: 'IG'
1193
+ },
1194
+ {
1195
+ title: '@creator2',
1196
+ profileIconUrl: 'https://example.com/av2.jpg',
1197
+ thumbnailUrl: 'https://example.com/th2.jpg',
1198
+ videoUrl: 'https://example.com/r2.mp4',
1199
+ likes_count: 8200,
1200
+ reel_source: 'TT'
1201
+ }
789
1202
  ]
790
- })
1203
+ }, { quoted: message })
791
1204
  ```
792
-
793
1205
  </details>
794
1206
 
795
1207
  <details>
796
- <summary><b>🔍 Rich Sources — <code>richSources</code> / <code>richSource</code></b></summary>
1208
+ <summary><b>📋 Fields Reference</b></summary>
1209
+
1210
+ | Field | Type | Default | Description |
1211
+ |:---|:---|:---:|:---|
1212
+ | `title` | `string` | — | Username / creator name |
1213
+ | `profileIconUrl` | `string` | — | Avatar URL |
1214
+ | `thumbnailUrl` | `string` | — | Thumbnail cover URL |
1215
+ | `videoUrl` | `string` | — | Video source URL |
1216
+ | `reels_title` | `string` | `''` | Reel title |
1217
+ | `likes_count` | `number` | `0` | Like count |
1218
+ | `shares_count` | `number` | `0` | Share count |
1219
+ | `view_count` | `number` | `0` | View count |
1220
+ | `reel_source` | `string` | `'IG'` | Source platform |
1221
+ | `is_verified` | `boolean` | `false` | Verified badge |
797
1222
 
798
- **Shorthand:**
1223
+ </details>
1224
+
1225
+ ---
1226
+
1227
+ #### 🔍 Rich Sources
1228
+
1229
+ > Search result source list as `GenAISearchResultPrimitive`. Accepts full objects **or** shorthand `[faviconUrl, sourceUrl, displayName]`.
1230
+
1231
+ <details>
1232
+ <summary><b>Shorthand Array</b></summary>
799
1233
 
800
1234
  ```js
801
1235
  await sock.sendMessage(jid, {
802
1236
  richSources: [
803
1237
  ['https://wikipedia.org/favicon.ico', 'https://wikipedia.org/wiki/Node.js', 'Wikipedia'],
804
- ['https://nodejs.org/favicon.ico', 'https://nodejs.org/en/docs', 'Node.js Docs']
1238
+ ['https://nodejs.org/favicon.ico', 'https://nodejs.org/en/docs', 'Node.js Docs'],
1239
+ ['https://github.com/favicon.ico', 'https://github.com/nodejs/node', 'GitHub']
805
1240
  ]
806
1241
  }, { quoted: message })
807
1242
  ```
1243
+ </details>
808
1244
 
809
- **Full object:**
1245
+ <details>
1246
+ <summary><b>Full Object</b></summary>
810
1247
 
811
1248
  ```js
812
1249
  await sock.sendMessage(jid, {
813
- richSources: [{
814
- source_type: 'THIRD_PARTY',
815
- source_display_name: 'Wikipedia',
816
- source_subtitle: 'wikipedia.org',
817
- source_url: 'https://wikipedia.org/wiki/Node.js',
818
- favicon: {
819
- url: 'https://wikipedia.org/favicon.ico',
820
- mime_type: 'image/jpeg',
821
- width: 16,
822
- height: 16
1250
+ richSources: [
1251
+ {
1252
+ source_type: 'THIRD_PARTY',
1253
+ source_display_name: 'Wikipedia',
1254
+ source_subtitle: 'wikipedia.org',
1255
+ source_url: 'https://wikipedia.org/wiki/Node.js',
1256
+ favicon: { url: 'https://wikipedia.org/favicon.ico', mime_type: 'image/jpeg', width: 16, height: 16 }
823
1257
  }
824
- }]
1258
+ ]
825
1259
  }, { quoted: message })
826
1260
  ```
1261
+ </details>
827
1262
 
828
- **Builder:**
1263
+ <details>
1264
+ <summary><b>Mixed Format</b></summary>
829
1265
 
830
1266
  ```js
831
1267
  await sock.sendMessage(jid, {
832
- items: [
833
- build.richSource([
834
- ['https://wikipedia.org/favicon.ico', 'https://wikipedia.org/wiki/Node.js', 'Wikipedia']
835
- ])
1268
+ richSources: [
1269
+ ['https://wikipedia.org/fav.ico', 'https://wikipedia.org', 'Wikipedia'],
1270
+ { source_type: 'THIRD_PARTY', source_display_name: 'Docs', source_url: 'https://docs.example.com' }
836
1271
  ]
837
- })
1272
+ }, { quoted: message })
838
1273
  ```
839
-
840
1274
  </details>
841
1275
 
842
- <details>
843
- <summary><b>📌 Rich Tip, Footer & Metadata — <code>richTip</code> / <code>richFooter</code> / <code>richMetadata</code></b></summary>
1276
+ ---
844
1277
 
845
- ```js
846
- await sock.sendMessage(jid, {
847
- richTip: 'Dihasilkan oleh AI · PontaLabs'
848
- }, { quoted: message })
1278
+ #### 📌 Rich Tip & Footer
849
1279
 
850
- await sock.sendMessage(jid, {
851
- richFooter: '© PontaLabs · Data bersumber dari layanan publik'
852
- }, { quoted: message })
853
- ```
1280
+ > `richTip` — small metadata text above/center of message.
1281
+ > `richFooter` — metadata text below message (disclaimer / branding).
854
1282
 
855
- **Builder:**
1283
+ <details>
1284
+ <summary><b>Rich Tip</b></summary>
856
1285
 
857
1286
  ```js
858
1287
  await sock.sendMessage(jid, {
859
- items: [
860
- build.richTip('AI-generated content'),
861
- build.richMetadata('PontaLabs Rich Message'),
862
- build.richFooter('© PontaLabs')
863
- ]
864
- })
1288
+ richTip: 'Dihasilkan oleh AI · pontalabs v0.3.4'
1289
+ }, { quoted: message })
865
1290
  ```
866
-
867
1291
  </details>
868
1292
 
869
1293
  <details>
870
- <summary><b>🧩 Rich FOA Text — <code>richFOAText</code></b></summary>
1294
+ <summary><b>Rich Footer</b></summary>
871
1295
 
872
1296
  ```js
873
1297
  await sock.sendMessage(jid, {
874
- items: [
875
- build.richFOAText('Halo dari FOA Rich Text')
876
- ]
877
- })
1298
+ richFooter: '© 2025 PontaCT · Data bersumber dari layanan publik'
1299
+ }, { quoted: message })
878
1300
  ```
879
-
880
1301
  </details>
881
1302
 
882
1303
  <details>
883
- <summary><b>🧱 Rich Widget — <code>richWidget</code></b></summary>
1304
+ <summary><b>Inside items / richResponse</b></summary>
884
1305
 
885
1306
  ```js
1307
+ // items
886
1308
  await sock.sendMessage(jid, {
887
1309
  items: [
888
- build.richWidget({
889
- /* widget payload */
890
- })
1310
+ { text: 'Hasil pencarian:' },
1311
+ { sources: [['https://fav.ico', 'https://example.com', 'Example']] },
1312
+ { tip: 'AI-generated content' },
1313
+ { footer: '© PontaCT Baileys' }
891
1314
  ]
892
- })
893
- ```
894
-
895
- </details>
896
-
897
- <details>
898
- <summary><b>🔀 Mixed Rich — <code>items</code></b></summary>
899
-
900
- Semua Rich item dapat dicampur dalam satu `items`. Urutan array menjadi urutan tampilan.
1315
+ }, { quoted: message })
901
1316
 
902
- ```js
1317
+ // richResponse
903
1318
  await sock.sendMessage(jid, {
904
- items: [
905
- { text: '*Laporan Harian Bot*' },
906
- { table: {
907
- headers: ['Metric', 'Value'],
908
- rows: [
909
- ['Uptime', '99.9%'],
910
- ['Messages', '1.2K']
911
- ]
912
- }},
913
- build.richText('SELECT COUNT(*) FROM messages;'),
914
- build.richHtml('<h2>Dashboard</h2>'),
915
- build.richSuggest('Refresh'),
916
- build.richFooter('Auto-generated · PontaLabs')
1319
+ richResponse: [
1320
+ { text: 'Summary di sini.' },
1321
+ { footer: '© PontaCT · pontalabs' }
917
1322
  ]
918
1323
  }, { quoted: message })
919
1324
  ```
920
-
921
- **Item shorthand yang tersedia:**
922
-
923
- <details>
924
- <summary><b>📋 Lihat semua key <code>items</code></b></summary>
925
-
926
- - `{ text, inlineEntities? }` — Rich text
927
- - `{ table }` — Table
928
- - `{ images }` — Image grid
929
- - `{ videoUrl, mimeType?, duration? }` — Video
930
- - `{ suggestions }` — Suggestion pills
931
- - `{ latexUrl, latexText?, latexWidth?, latexHeight? }` — LaTeX
932
- - `{ product }` — Product card
933
- - `{ post }` — Post card
934
- - `{ reels }` — Reels
935
- - `{ sources }` — Sources
936
- - `{ tip }` — Tip
937
- - `{ footer }` — Footer
938
-
939
- </details>
940
-
941
1325
  </details>
942
1326
 
943
- <details>
944
- <summary><b>🔗 Rich Response — <code>richResponse</code></b></summary>
1327
+ ---
945
1328
 
946
- `richResponse` adalah full array mode untuk menyusun Rich primitive secara manual, termasuk inline citation melalui `inlineEntities`.
1329
+ #### 🔀 Rich Mixed — `items`
947
1330
 
948
- **Basic:**
1331
+ <details>
1332
+ <summary><b>Text + Code + Table</b></summary>
949
1333
 
950
1334
  ```js
951
1335
  await sock.sendMessage(jid, {
952
- richResponse: [
953
- { text: '*Hasil:* Node.js adalah runtime JavaScript.' },
954
- { code: 'node --version', language: 'bash' },
955
- { suggestions: ['Lihat docs', 'Install'] },
956
- { footer: 'PontaLabs' }
1336
+ items: [
1337
+ { text: 'Query yang dijalankan:' },
1338
+ { code: 'SELECT id, name, score FROM users ORDER BY score DESC LIMIT 3', language: 'sql' },
1339
+ { text: 'Hasil:' },
1340
+ {
1341
+ table: {
1342
+ headers: ['id', 'name', 'score'],
1343
+ rows: [
1344
+ ['1', 'Ponta', '98'],
1345
+ ['2', 'Yue', '87'],
1346
+ ['3', 'Frieren', '75']
1347
+ ]
1348
+ }
1349
+ }
957
1350
  ]
958
1351
  }, { quoted: message })
959
1352
  ```
960
1353
 
961
- **Inline citation:**
962
-
963
- ```js
1354
+ ```
1355
+ // build delay (muncul satu satu)
964
1356
  await sock.sendMessage(jid, {
965
- richResponse: [{
966
- text: 'Node.js {{SS_0}}¹{{/SS_0}} adalah runtime JavaScript.',
967
- inlineEntities: [{
968
- key: 'SS_0',
969
- metadata: {
970
- reference_id: 1,
971
- reference_url: 'https://nodejs.org',
972
- reference_title: 'Node.js Official',
973
- reference_display_name: 'nodejs.org',
974
- sources: [{
975
- source_type: 'THIRD_PARTY',
976
- source_display_name: 'Node.js',
977
- source_url: 'https://nodejs.org'
978
- }]
1357
+ items: [
1358
+ { text: 'Query yang dijalankan:' },
1359
+ { code: 'SELECT id, name, score FROM users ORDER BY score DESC LIMIT 3', language: 'sql' },
1360
+ { text: 'Hasil:' },
1361
+ {
1362
+ table: {
1363
+ headers: ['id', 'name', 'score'],
1364
+ rows: [
1365
+ ['1', 'Ponta', '98'],
1366
+ ['2', 'Yue', '87'],
1367
+ ['3', 'Frieren', '75']
1368
+ ]
979
1369
  }
980
- }]
981
- }]
1370
+ }
1371
+ ],
1372
+ buildDelay: 2500,
982
1373
  }, { quoted: message })
983
1374
  ```
1375
+ </details>
984
1376
 
985
- **Table di `richResponse`:**
1377
+ <details>
1378
+ <summary><b>Text + Images + Video + Suggestions</b></summary>
986
1379
 
987
1380
  ```js
988
1381
  await sock.sendMessage(jid, {
989
- richResponse: [{
990
- table: {
991
- items: [
992
- { items: ['Name', 'Role'], isHeading: true },
993
- { items: ['Ponta', 'Admin'] }
994
- ]
995
- }
996
- }]
1382
+ items: [
1383
+ { text: '*Konten hari ini*' },
1384
+ { images: ['https://example.com/1.jpg', 'https://example.com/2.jpg'] },
1385
+ { videoUrl: 'https://example.com/preview.mp4', duration: 15 },
1386
+ { suggestions: ['Lihat selengkapnya', 'Bagikan', 'Simpan'] }
1387
+ ]
997
1388
  }, { quoted: message })
998
1389
  ```
999
-
1000
- > Berbeda dari `table` top-level / `items`, format table di `richResponse` harus berupa array row siap-pakai.
1001
-
1002
1390
  </details>
1003
1391
 
1004
1392
  <details>
1005
- <summary><b>🎛️ Interactive Rich Builder — Button, ButtonV2 & Carousel</b></summary>
1006
-
1007
- Builder interactive juga berada di namespace `build` dan dikirim melalui `sock.sendMessage()`.
1008
-
1009
- **Native Flow Button:**
1393
+ <summary><b>Full Mixed (all types)</b></summary>
1010
1394
 
1011
1395
  ```js
1012
- const button = build.button()
1013
- .setTitle('Menu')
1014
- .setBody('Pilih salah satu')
1015
- .setFooter('PontaLabs')
1016
- .addReply('Halo', 'hello')
1017
- .addUrl('Website', 'https://example.com')
1018
- .addCopy('Copy ID', 'ABC123')
1019
-
1020
1396
  await sock.sendMessage(jid, {
1021
- items: [button]
1022
- })
1397
+ items: [
1398
+ { text: '*Laporan Harian Bot*' },
1399
+ { table: { headers: ['Metric', 'Value'], rows: [['Uptime', '99.9%'], ['Messages', '1.2K']] } },
1400
+ { code: 'SELECT COUNT(*) FROM messages WHERE date = CURDATE()', language: 'sql' },
1401
+ { text: 'Formula uptime:' },
1402
+ {
1403
+ latexUrl: 'https://latex.codecogs.com/png.latex?U%3D%5Cfrac%7Bt_u%7D%7Bt_t%7D%5Ctimes100',
1404
+ latexText: 'U = (tu/tt) × 100'
1405
+ },
1406
+ { sources: [['https://example.com/fav.ico', 'https://example.com', 'Dashboard']] },
1407
+ { suggestions: ['Refresh', 'Export PDF'] },
1408
+ { footer: 'Auto-generated · PontaCT' }
1409
+ ]
1410
+ }, { quoted: message })
1023
1411
  ```
1412
+ </details>
1024
1413
 
1025
- **ButtonV2:**
1026
-
1027
- ```js
1028
- const buttons = build.buttonV2()
1029
- .setBody('Pilih aksi')
1030
- .setFooter('PontaLabs')
1031
- .addButton('Yes')
1032
- .addButton('No')
1414
+ ---
1033
1415
 
1034
- await sock.sendMessage(jid, {
1035
- items: [buttons]
1036
- })
1037
- ```
1416
+ #### 🔗 Rich Response — `richResponse`
1038
1417
 
1039
- **Carousel:**
1418
+ <details>
1419
+ <summary><b>Inline Citation</b></summary>
1040
1420
 
1041
1421
  ```js
1042
- const carousel = build.carousel()
1043
- .addCard(c => c
1044
- .setTitle('Card 1')
1045
- .setBody('Deskripsi 1')
1046
- .addReply('Pilih', 'card1')
1047
- )
1048
- .addCard(c => c
1049
- .setTitle('Card 2')
1050
- .setBody('Deskripsi 2')
1051
- .addUrl('Buka', 'https://example.com')
1052
- )
1053
-
1054
1422
  await sock.sendMessage(jid, {
1055
- items: [carousel]
1056
- })
1423
+ richResponse: [
1424
+ {
1425
+ text: 'Node.js {{SS_0}}¹{{/SS_0}} adalah runtime JavaScript. Dibuat oleh Ryan Dahl {{SS_1}}²{{/SS_1}} pada 2009.',
1426
+ inlineEntities: [
1427
+ {
1428
+ key: 'SS_0',
1429
+ metadata: {
1430
+ reference_id: 1,
1431
+ reference_url: 'https://nodejs.org',
1432
+ reference_title: 'Node.js Official',
1433
+ reference_display_name: 'nodejs.org',
1434
+ sources: [{
1435
+ source_type: 'THIRD_PARTY',
1436
+ source_display_name: 'nodejs.org',
1437
+ source_subtitle: 'nodejs.org',
1438
+ source_url: 'https://nodejs.org'
1439
+ }],
1440
+ __typename: 'GenAISearchCitationItem'
1441
+ }
1442
+ },
1443
+ {
1444
+ key: 'SS_1',
1445
+ metadata: {
1446
+ reference_id: 2,
1447
+ reference_url: 'https://wikipedia.org/wiki/Ryan_Dahl',
1448
+ reference_title: 'Ryan Dahl - Wikipedia',
1449
+ reference_display_name: 'Wikipedia',
1450
+ sources: [{
1451
+ source_type: 'THIRD_PARTY',
1452
+ source_display_name: 'Wikipedia',
1453
+ source_subtitle: 'wikipedia.org',
1454
+ source_url: 'https://wikipedia.org/wiki/Ryan_Dahl'
1455
+ }],
1456
+ __typename: 'GenAISearchCitationItem'
1457
+ }
1458
+ }
1459
+ ]
1460
+ }
1461
+ ]
1462
+ }, { quoted: message })
1057
1463
  ```
1058
-
1059
1464
  </details>
1060
1465
 
1061
1466
  <details>
1062
- <summary><b>⏱️ Rich Build Delay — <code>buildDelay</code></b></summary>
1063
-
1064
- `buildDelay` digunakan bersama `items` untuk melakukan progressive update pada target message yang sama.
1065
-
1066
- ```js
1067
- await sock.sendMessage(jid, {
1068
- items: [
1069
- build.richText('⏳ Memproses...'),
1070
- build.richText('🔍 Mencari data...'),
1071
- build.richText('✅ Selesai!')
1072
- ],
1073
- buildDelay: 1000
1074
- })
1075
- ```
1076
-
1077
- Dengan `buildDelay: 1000`, item berikutnya diproses setiap 1 detik dan update tetap menggunakan message ID target yang sama.
1078
-
1079
- **Custom message ID:**
1467
+ <summary><b>Full Response — all types at once</b></summary>
1080
1468
 
1081
1469
  ```js
1082
1470
  await sock.sendMessage(jid, {
1083
- messageId: 'MY_MESSAGE_ID',
1084
- items: [
1085
- build.richText('Build 1'),
1086
- build.richText('Build 2')
1471
+ richResponse: [
1472
+ { text: '*Hasil Pencarian:* Node.js {{SS_0}}¹{{/SS_0}}', inlineEntities: [/* ... */] },
1473
+ { images: ['https://example.com/nodejs.png'] },
1474
+ { text: 'Cara install:' },
1475
+ { code: 'npm install node', language: 'bash' },
1476
+ {
1477
+ table: [
1478
+ { items: ['Version', 'LTS', 'Release'], isHeading: true },
1479
+ { items: ['22.x', 'Yes', '2024'], isHeading: false },
1480
+ { items: ['21.x', 'No', '2023'], isHeading: false }
1481
+ ]
1482
+ },
1483
+ { sources: [['https://nodejs.org/fav.ico', 'https://nodejs.org', 'Node.js']] },
1484
+ { suggestions: ['Lihat changelog', 'Download', 'Docs'] },
1485
+ { footer: 'PontaCT · pontalabs' }
1087
1486
  ],
1088
- buildDelay: 1000
1089
- })
1487
+ buildDelay: 2500,
1488
+ }, { quoted: message })
1090
1489
  ```
1091
-
1092
1490
  </details>
1093
1491
 
1094
- <details>
1095
- <summary><b>🛠️ Advanced Rich Builder — <code>build.AIRich(sock)</code></b></summary>
1096
-
1097
- Untuk state, node ID, replace, insert, delete, dan edit message gunakan `build.AIRich(sock)`.
1098
-
1099
- ```js
1100
- const ai = build.AIRich(sock)
1101
-
1102
- ai.addText('⏳ Loading...', { id: 'status' })
1103
- ai.addTip('Mohon tunggu')
1104
-
1105
- await ai.send(jid)
1106
-
1107
- ai.addText('✅ Selesai!', { replace: 'status' })
1108
- ai.delete('status')
1109
- ai.addTip('Tambahan', { insertAt: 'status' })
1110
- ```
1111
-
1112
- **Contoh edit:**
1113
-
1114
- ```js
1115
- const ai = build.AIRich(sock)
1116
-
1117
- ai.addText('⏳ Memproses...', { id: 'answer' })
1118
- await ai.send(jid)
1119
-
1120
- const result = await getAIResponse()
1121
-
1122
- ai.addText(result, { replace: 'answer' })
1123
- ai.addTip('Generated by AI')
1124
-
1125
- await ai.sendEdit(jid)
1126
- ```
1127
-
1128
- > `replace` dan `insertAt` adalah options pada `add*()`, bukan method `ai.replace()` atau `ai.insertAt()`.
1492
+ ---
1129
1493
 
1130
- </details>
1494
+ #### ⚙️ Rich Options
1131
1495
 
1132
1496
  <details>
1133
- <summary><b>⚙️ Rich Options — <code>aiForwarded</code></b></summary>
1497
+ <summary><b><code>aiForwarded</code> — toggle label "Diteruskan dari bot AI"</b></summary>
1134
1498
 
1135
- `aiForwarded` menambahkan label forwarded-from-AI-bot pada `contextInfo`.
1499
+ > Default `false`. Set `true` kalau mau pesan diberi tag forwarded-from-AI-bot di `contextInfo`. Bisa dipakai bareng key rich manapun (`richText`, `items`, `richResponse`, dll).
1136
1500
 
1137
1501
  ```js
1138
1502
  await sock.sendMessage(jid, {
@@ -1140,42 +1504,6 @@ await sock.sendMessage(jid, {
1140
1504
  aiForwarded: true
1141
1505
  }, { quoted: message })
1142
1506
  ```
1143
-
1144
- Bisa digunakan bersama `richText`, `items`, `richResponse`, `richHtml`, dan key Rich lainnya.
1145
-
1146
- </details>
1147
-
1148
- <details>
1149
- <summary><b>🔌 Legacy Compatibility</b></summary>
1150
-
1151
- API Rich lama tetap kompatibel:
1152
-
1153
- ```js
1154
- await sock.sendMessage(jid, {
1155
- richText: 'Halo'
1156
- })
1157
-
1158
- await sock.sendMessage(jid, {
1159
- items: [
1160
- { richText: 'Halo' },
1161
- { richTip: 'Testing' }
1162
- ]
1163
- })
1164
- ```
1165
-
1166
- Kamu juga dapat mencampur object Rich lama dengan `build.*`:
1167
-
1168
- ```js
1169
- await sock.sendMessage(jid, {
1170
- items: [
1171
- { richText: 'Shortcut lama' },
1172
- build.richText('Builder baru'),
1173
- { richTip: 'Shortcut lama' },
1174
- build.richTip('Builder baru')
1175
- ]
1176
- })
1177
- ```
1178
-
1179
1507
  </details>
1180
1508
 
1181
1509
  ---
@@ -1195,19 +1523,39 @@ const newsletter = await sock.newsletterMetadata('jid', '120363282083849178@news
1195
1523
  </details>
1196
1524
 
1197
1525
  <details>
1198
- <summary><b>➕ Follow / Unfollow Newsletter</b></summary>
1526
+ <summary><b>👆 Follow / Unfollow / Mute / Unmute</b></summary>
1527
+
1528
+ ```js
1529
+ const nlJid = '120363282083849178@newsletter'
1530
+
1531
+ await sock.newsletterFollow(nlJid)
1532
+ await sock.newsletterUnfollow(nlJid)
1533
+ await sock.newsletterMute(nlJid)
1534
+ await sock.newsletterUnmute(nlJid)
1535
+ ```
1536
+ </details>
1537
+
1538
+ <details>
1539
+ <summary><b>📣 Create Newsletter</b></summary>
1199
1540
 
1200
1541
  ```js
1201
- await sock.newsletterFollow('120363282083849178@newsletter')
1202
- await sock.newsletterUnfollow('120363282083849178@newsletter')
1542
+ const newsletter = await sock.newsletterCreate(
1543
+ 'Newsletter Name',
1544
+ 'Description here',
1545
+ { url: 'https://example.com/image.jpg' }
1546
+ )
1203
1547
  ```
1204
1548
  </details>
1205
1549
 
1206
1550
  <details>
1207
- <summary><b>📨 Newsletter Reaction</b></summary>
1551
+ <summary><b>🌟 React to Newsletter Post</b></summary>
1208
1552
 
1209
1553
  ```js
1210
- await sock.newsletterReactMessage('120363282083849178@newsletter', '123', '🔥')
1554
+ await sock.newsletterReactMessage(
1555
+ '120363282083849178@newsletter',
1556
+ '12', // server message ID
1557
+ '🦖' // emoji
1558
+ )
1211
1559
  ```
1212
1560
  </details>
1213
1561
 
@@ -1216,11 +1564,15 @@ await sock.newsletterReactMessage('120363282083849178@newsletter', '123', '🔥'
1216
1564
  ## 👥 Groups
1217
1565
 
1218
1566
  <details>
1219
- <summary><b>📝 Create Group</b></summary>
1567
+ <summary><b>🔄 Create Group</b></summary>
1220
1568
 
1221
1569
  ```js
1222
- const group = await sock.groupCreate('My Group', ['1234567890@s.whatsapp.net'])
1223
- console.log('Group ID:', group.id)
1570
+ const group = await sock.groupCreate('Group Title', [
1571
+ '1234567890@s.whatsapp.net',
1572
+ '0987654321@s.whatsapp.net'
1573
+ ])
1574
+
1575
+ console.log('Group JID:', group.id)
1224
1576
  ```
1225
1577
  </details>
1226
1578
 
@@ -1420,14 +1772,6 @@ const summary = getAggregateResponsesInEventMessage(eventMsg, sock.user.lid)
1420
1772
 
1421
1773
  ## 🤝 Contributing
1422
1774
 
1423
- <div align="center">
1424
-
1425
- <img src="https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Hand%20gestures/Handshake.png" width="60" />
1426
-
1427
- **Contributions are welcome!**
1428
-
1429
- </div>
1430
-
1431
1775
  1. **Fork** repository
1432
1776
  2. Create a feature branch: `git checkout -b feat/your-feature`
1433
1777
  3. Commit your changes: `git commit -m "feat: add something awesome"`
@@ -1438,10 +1782,6 @@ const summary = getAggregateResponsesInEventMessage(eventMsg, sock.user.lid)
1438
1782
 
1439
1783
  ## 📜 License
1440
1784
 
1441
- <div align="center">
1442
-
1443
- <img src="https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Objects/Scroll.png" width="40" />
1444
-
1445
1785
  This project is licensed for **personal and non-commercial use only**.
1446
1786
 
1447
1787
  | | |
@@ -1451,8 +1791,6 @@ This project is licensed for **personal and non-commercial use only**.
1451
1791
  | ❌ | Commercial use strictly prohibited |
1452
1792
  | ❌ | Resale or rebranding prohibited |
1453
1793
 
1454
- </div>
1455
-
1456
1794
  ---
1457
1795
 
1458
1796
  ## ⚠️ Disclaimer
@@ -1464,16 +1802,10 @@ This project is licensed for **personal and non-commercial use only**.
1464
1802
 
1465
1803
  <div align="center">
1466
1804
 
1467
- <img src="https://capsule-render.vercel.app/api?type=waving&color=0:0f0c29,100:302b63&height=150&section=footer&text=PontaLabs&fontSize=30&fontColor=fff&animation=fadeIn" width="100%"/>
1468
-
1469
1805
  [📦 NPM](https://www.npmjs.com/package/@pontalabs/baileys) · [📖 Baileys Wiki](https://github.com/WhiskeySockets/Baileys/wiki) · [⭐ Star this repo](#)
1470
1806
 
1471
1807
  <br>
1472
1808
 
1473
- <img src="https://readme-typing-svg.demolab.com?font=Fira+Code&size=14&pause=1000&color=00D9FF&center=true&width=400&lines=Made+with+%E2%99%A5+by+PontaCT;Thanks+for+visiting!" alt="footer typing" />
1474
-
1475
- <br><br>
1476
-
1477
- <img src="https://komarev.com/ghpvc/?username=PontaCT&label=Thanks+for+visiting&color=00D9FF&style=flat-square" />
1809
+ Made with ♥ by **PontaCT**
1478
1810
 
1479
1811
  </div>