@pontalabs/baileys 1.2.6 → 1.2.8

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