@pontalabs/baileys 1.2.5 → 1.2.6

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 +171 -436
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,41 +1,60 @@
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
+
1
3
  <div align="center">
2
4
 
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;" />
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>
5
9
 
6
10
  <br><br>
7
11
 
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>
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>
13
16
 
14
17
  <br>
15
18
 
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>
29
-
30
- <br><br>
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%" />
31
37
 
32
38
  <p><em>Extended from <code>@whiskeysockets/baileys</code> — packed with exclusive patches, AI-rich messages, and advanced WhatsApp features.</em></p>
33
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>
47
+
48
+ <div align="center">
49
+
50
+ ### ⚡ Quick Navigation ⚡
51
+ `Installation` • `Quick Start` • `Rich Messages` • `Newsletter` • `Groups`
52
+
34
53
  </div>
35
54
 
36
55
  ---
37
56
 
38
- ## 📑 Table of Contents
57
+ ## <img src="https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Objects/Bookmark.png" width="30" /> Table of Contents
39
58
 
40
59
  - [Why This Fork?](#-why-this-fork)
41
60
  - [Features](#-features)
@@ -56,8 +75,20 @@
56
75
 
57
76
  ---
58
77
 
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
+
59
84
  <details>
60
- <summary><h2>📥 Installation</h2></summary>
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>
61
92
 
62
93
  ```bash
63
94
  # npm
@@ -65,6 +96,12 @@ npm install @pontalabs/baileys
65
96
 
66
97
  # yarn
67
98
  yarn add @pontalabs/baileys
99
+
100
+ # pnpm
101
+ pnpm add @pontalabs/baileys
102
+
103
+ # bun
104
+ bun add @pontalabs/baileys
68
105
  ```
69
106
 
70
107
  </details>
@@ -72,7 +109,9 @@ yarn add @pontalabs/baileys
72
109
  ---
73
110
 
74
111
  <details>
75
- <summary><h2>🚀 Quick Start</h2></summary>
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>
76
115
 
77
116
  ```js
78
117
  import makeWASocket, { useMultiFileAuthState } from '@pontalabs/baileys'
@@ -95,13 +134,15 @@ async function start() {
95
134
  start()
96
135
  ```
97
136
 
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
+
98
139
  </details>
99
140
 
100
141
  ---
101
142
 
102
143
  ## 📖 Documentation
103
144
 
104
- ### 🔌 Connecting
145
+ ### <img src="https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Objects/Electric%20Plug.png" width="25" /> Connecting
105
146
 
106
147
  <details>
107
148
  <summary><b>🔗 QR Code</b></summary>
@@ -257,341 +298,61 @@ await sock.sendMessage(jid, {
257
298
  await sock.sendMessage(jid, {
258
299
  location: {
259
300
  degreesLatitude: 37.422,
260
- degreesLongitude: -122.084,
261
- name: 'Google HQ'
301
+ degreesLongitude: -122.084
262
302
  }
263
303
  })
264
304
  ```
265
305
  </details>
266
306
 
267
307
  <details>
268
- <summary><b>💥 React</b></summary>
269
-
270
- ```js
271
- await sock.sendMessage(jid, { react: { text: '👍', key: message.key } })
272
- // Remove reaction
273
- await sock.sendMessage(jid, { react: { text: '', key: message.key } })
274
- ```
275
- </details>
276
-
277
- <details>
278
- <summary><b>📊 Poll</b></summary>
308
+ <summary><b>📄 Document</b></summary>
279
309
 
280
310
  ```js
281
311
  await sock.sendMessage(jid, {
282
- poll: {
283
- name: 'Favorite color?',
284
- values: ['Red', 'Blue', 'Green'],
285
- selectableCount: 1
286
- }
312
+ document: fs.readFileSync('file.pdf'),
313
+ mimetype: 'application/pdf',
314
+ fileName: 'myfile.pdf'
287
315
  })
288
316
  ```
289
317
  </details>
290
318
 
291
319
  <details>
292
- <summary><b>📸 Album</b></summary>
293
-
294
- ```js
295
- await sock.sendAlbumMessage(jid, [
296
- { image: { url: 'https://example.com/1.jpg' }, caption: 'First' },
297
- { video: { url: 'https://example.com/clip.mp4' }, caption: 'Second' }
298
- ], { quoted: message, delay: 3000 })
299
- ```
300
- </details>
301
-
302
- <details>
303
- <summary><b>👨‍💻 Interactive (Native Flow & Carousel)</b></summary>
320
+ <summary><b>😆 Reaction</b></summary>
304
321
 
305
322
  ```js
306
- // Native Flow
307
- await sock.sendMessage(jid, {
308
- text: 'Choose an option:',
309
- title: 'Title',
310
- footer: '© PontaLabs Baileys',
311
- interactive: [{
312
- name: 'quick_reply',
313
- buttonParamsJson: JSON.stringify({ display_text: 'Quick Reply', id: '123' })
314
- }]
315
- })
316
-
317
- // Carousel
318
323
  await sock.sendMessage(jid, {
319
- text: 'Check out our collection!',
320
- title: 'Catalog',
321
- footer: '© PontaLabs Baileys',
322
- cards: [{
323
- image: { url: 'https://example.com/image.jpg' },
324
- title: 'Product Name',
325
- body: 'Product description',
326
- footer: '© PontaLabs',
327
- buttons: [{
328
- name: 'quick_reply',
329
- buttonParamsJson: JSON.stringify({ display_text: 'Select', id: '1' })
330
- }]
331
- }]
332
- })
333
- ```
334
- </details>
335
-
336
- <details>
337
- <summary><b>🔩 Raw / Legacy Buttons</b></summary>
338
-
339
- > Varian tombol raw/proto WhatsApp mentah — lebih fleksibel, tapi kamu yang susun strukturnya sendiri.
340
-
341
- #### `buttonsMessage`
342
-
343
- Kirim objek `buttonsMessage` proto WhatsApp mentah — thumbnail lokasi di dalamnya otomatis diproses kalau berupa Buffer/URL/path.
344
-
345
- ```js
346
- await sock.sendMessage(jid, {
347
- buttonsMessage: {
348
- contentText: 'Pilih salah satu:',
349
- footerText: '© PontaCT',
350
- buttons: [
351
- { buttonId: 'a', buttonText: { displayText: 'Opsi A' }, type: 1 },
352
- { buttonId: 'b', buttonText: { displayText: 'Opsi B' }, type: 1 }
353
- ]
354
- }
355
- }, { quoted: message })
356
- ```
357
-
358
- #### `templateButtons`
359
-
360
- ```js
361
- await sock.sendMessage(jid, {
362
- text: 'Butuh bantuan?',
363
- footer: '© PontaCT',
364
- templateButtons: [
365
- { index: 1, urlButton: { displayText: 'Kunjungi Website', url: 'https://example.com' } },
366
- { index: 2, callButton: { displayText: 'Telepon', phoneNumber: '+6281234567890' } }
367
- ]
368
- }, { quoted: message })
369
- ```
370
-
371
- #### `interactiveButtons`
372
-
373
- ```js
374
- await sock.sendMessage(jid, {
375
- title: 'Menu Utama',
376
- subtitle: 'Silakan pilih',
377
- text: 'Ada yang bisa dibantu?',
378
- footer: '© PontaCT',
379
- interactiveButtons: [
380
- { name: 'quick_reply', buttonParamsJson: JSON.stringify({ display_text: 'Mulai', id: 'start' }) }
381
- ]
382
- }, { quoted: message })
383
- ```
384
-
385
- </details>
386
-
387
- <details>
388
- <summary><b>📌 Pin & Keep</b></summary>
389
-
390
- ```js
391
- // Pin — 24h = 86400 · 7d = 604800 · 30d = 2592000
392
- await sock.sendMessage(jid, { pin: { type: 1, time: 86400, key: message.key } })
393
-
394
- // Keep
395
- await sock.sendMessage(jid, { keep: { key: message.key, type: 1 } })
396
- ```
397
- </details>
398
-
399
- ---
400
-
401
- ### 📍 Location + Buttons
402
-
403
- > Location message with native list menu (`single_select`) and extra buttons — all in one `buttonsMessage`.
404
-
405
- <details>
406
- <summary><b>Location + List Menu</b></summary>
407
-
408
- ```js
409
- await sock.sendMessage(jid, {
410
- buttonLocation: {
411
- latitude: -6.2088,
412
- longitude: 106.8456,
413
- name: 'Kantor Pusat PontaCT',
414
- address: 'Jl. Sudirman No. 1, Jakarta Pusat',
415
- text: 'Temukan kami di sini:',
416
- footer: '© PontaCT',
417
- thumbnail: 'https://example.com/map-preview.jpg',
418
- listButtonText: 'Pilih Layanan',
419
- listSectionTitle: 'Layanan Tersedia',
420
- listMenu: [
421
- { title: 'Customer Service', description: 'Lantai 1, Senin–Jumat 08.00–17.00', id: 'cs' },
422
- { title: 'Kasir & Pembayaran', description: 'Lantai 2, buka setiap hari', id: 'kasir' },
423
- { title: 'Gudang & Pengiriman', description: 'Gedung B, pintu belakang', id: 'gudang' }
424
- ]
425
- }
426
- })
427
- ```
428
- </details>
429
-
430
- <details>
431
- <summary><b>Location + Extra Buttons</b></summary>
432
-
433
- ```js
434
- await sock.sendMessage(jid, {
435
- buttonLocation: {
436
- latitude: -6.2088,
437
- longitude: 106.8456,
438
- name: 'Toko PontaCT',
439
- address: 'Jl. Kebon Sirih No. 10, Jakarta',
440
- text: 'Kunjungi toko kami!',
441
- footer: '© PontaCT',
442
- thumbnail: 'https://example.com/store.jpg',
443
- extraButtons: [
444
- { id: 'call', displayText: '📞 Hubungi Kami' },
445
- { id: 'whatsapp', displayText: '💬 WhatsApp' },
446
- { id: 'maps', displayText: '🗺️ Buka di Maps' }
447
- ]
324
+ react: {
325
+ text: '🔥',
326
+ key: message.key
448
327
  }
449
328
  })
450
329
  ```
451
330
  </details>
452
331
 
453
332
  <details>
454
- <summary><b>Location + List Menu + Extra Buttons</b></summary>
455
-
456
- ```js
457
- await sock.sendMessage(jid, {
458
- buttonLocation: {
459
- latitude: -6.2088,
460
- longitude: 106.8456,
461
- name: 'Plaza PontaCT',
462
- address: 'Jl. MH Thamrin No. 5, Jakarta',
463
- text: 'Selamat datang di pusat layanan kami.',
464
- footer: 'Buka setiap hari 09.00–21.00',
465
- thumbnail: 'https://example.com/plaza.jpg',
466
- listButtonText: 'Pilih Tujuan',
467
- listSectionTitle: 'Area Tersedia',
468
- listMenu: [
469
- { title: 'Food Court', description: 'Lt. 1 — lebih dari 30 tenant', id: 'food' },
470
- { title: 'Cinema', description: 'Lt. 4 — 8 studio', id: 'cinema' },
471
- { title: 'Customer Care', description: 'Lt. 2 — sebelah eskalator', id: 'care' }
472
- ],
473
- extraButtons: [
474
- { id: 'navigate', displayText: '🧭 Navigasi' },
475
- { id: 'promo', displayText: '🎁 Promo Hari Ini' }
476
- ]
477
- }
478
- })
479
- ```
480
- </details>
481
-
482
- <details>
483
- <summary><b>📋 Fields Reference</b></summary>
484
-
485
- | Field | Type | Required | Default | Description |
486
- |:---|:---|:---:|:---|:---|
487
- | `latitude` | `number` | — | `0` | Latitude coordinate |
488
- | `longitude` | `number` | — | `0` | Longitude coordinate |
489
- | `name` | `string` | — | `'Location'` | Place name |
490
- | `address` | `string` | — | `''` | Text address |
491
- | `text` | `string` | — | `''` | Message body text |
492
- | `footer` | `string` | — | `''` | Footer text |
493
- | `thumbnail` | `Buffer / URL / path` | ✅ | — | Map preview image |
494
- | `listButtonText` | `string` | — | `'Pilih Menu'` | List button label |
495
- | `listSectionTitle` | `string` | — | `'Pilihan'` | List section title |
496
- | `listMenu` | `array` | — | — | Menu rows |
497
- | `extraButtons` | `array` | — | — | Extra buttons |
498
-
499
- </details>
500
-
501
- ---
502
-
503
- ### 📦 Order Status
504
-
505
- > Interactive order tracking card using native `order_status` flow button.
506
-
507
- <details>
508
- <summary><b>Basic Order Status</b></summary>
509
-
510
- ```js
511
- await sock.sendMessage(jid, {
512
- orderStatus: {
513
- image: 'https://example.com/order-banner.jpg',
514
- title: 'Status Pesanan',
515
- text: 'Pesanan kamu sedang diproses oleh penjual.',
516
- referenceId: 'ORD-20250629-001',
517
- status: 'PROCESSING',
518
- currency: 'IDR'
519
- }
520
- })
521
- ```
522
- </details>
523
-
524
- <details>
525
- <summary><b>Full Order Status with Total & Tax</b></summary>
526
-
527
- ```js
528
- await sock.sendMessage(jid, {
529
- orderStatus: {
530
- image: 'https://example.com/order.jpg',
531
- title: 'Update Pesanan #ORD-2025-001',
532
- text: 'Pesananmu sedang dalam perjalanan! 🚚',
533
- footer: 'Estimasi tiba: 2–3 hari kerja',
534
- referenceId: 'ORD-2025-001',
535
- status: 'SHIPPED',
536
- subtotalValue: 15000000,
537
- subtotalOffset: 100,
538
- taxValue: 1500000,
539
- taxOffset: 100,
540
- currency: 'IDR'
541
- }
542
- })
543
- ```
544
- </details>
545
-
546
- <details>
547
- <summary><b>Local Image File</b></summary>
333
+ <summary><b>📊 Poll</b></summary>
548
334
 
549
335
  ```js
550
- const fs = require('fs')
551
336
  await sock.sendMessage(jid, {
552
- orderStatus: {
553
- image: fs.readFileSync('./assets/order-confirm.jpg'),
554
- title: 'Pesanan Dikonfirmasi ',
555
- text: 'Terima kasih telah berbelanja!',
556
- referenceId: 'ORD-LOCAL-001',
557
- status: 'PROCESSING',
558
- currency: 'IDR'
337
+ poll: {
338
+ name: 'Favorite Programming Language?',
339
+ values: ['JavaScript', 'Python', 'Go'],
340
+ selectableCount: 1
559
341
  }
560
342
  })
561
343
  ```
562
344
  </details>
563
345
 
564
- <details>
565
- <summary><b>📋 Fields Reference</b></summary>
566
-
567
- | Field | Type | Required | Default | Description |
568
- |:---|:---|:---:|:---|:---|
569
- | `image` | `Buffer / URL / path` | ✅ | — | Header card image |
570
- | `title` | `string` | — | `'Order Status'` | Header title |
571
- | `text` | `string` | — | `'Silakan cek status pesanan Anda.'` | Body text |
572
- | `footer` | `string` | — | `'Powered by PontaCT'` | Footer text |
573
- | `referenceId` | `string` | — | `'PT-001'` | Order reference ID |
574
- | `status` | `string` | — | `'PROCESSING'` | Order status |
575
- | `subtotalValue` | `number` | — | `0` | Subtotal value (in offset units) |
576
- | `subtotalOffset` | `number` | — | `100` | Value divider |
577
- | `taxValue` | `number` | — | `0` | Tax value |
578
- | `taxOffset` | `number` | — | `100` | Tax divider |
579
- | `currency` | `string` | — | `'IDR'` | Currency code |
580
-
581
- > **Status values:** `PROCESSING` · `SHIPPED` · `DELIVERED` · `CANCELLED` · `REFUNDED`
582
-
583
- </details>
584
-
585
346
  ---
586
347
 
587
- ### 🤖 Rich Messages
348
+ ### <img src="https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Activities/Sparkles.png" width="25" /> Rich Messages
588
349
 
589
- > Semua fitur **Rich Message** dikirim melalui `sock.sendMessage()` dan dirender sebagai AI bot message di WhatsApp.
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.
590
351
  >
591
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.
592
353
 
593
354
  <details>
594
- <summary><b>📌 Quick Start — Rich Message</b></summary>
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>
595
356
 
596
357
  ```js
597
358
  await sock.sendMessage(jid, {
@@ -649,16 +410,6 @@ await sock.sendMessage(jid, {
649
410
  })
650
411
  ```
651
412
 
652
- **Raw item:**
653
-
654
- ```js
655
- await sock.sendMessage(jid, {
656
- items: [
657
- { text: 'Halo! 👋' }
658
- ]
659
- })
660
- ```
661
-
662
413
  </details>
663
414
 
664
415
  <details>
@@ -710,60 +461,26 @@ await sock.sendMessage(jid, {
710
461
  > HTML berjalan di sisi client/webview. Gunakan HTML/JavaScript yang kamu kontrol dan sesuaikan dengan dukungan client WhatsApp yang dituju.
711
462
 
712
463
  </details>
713
- <details>
714
- <summary>👤 richCard — Entity Card</summary>
715
-
716
- Membuat Card Entity/Profile langsung melalui `sendMessage()`. Tidak membutuhkan `build` atau `AIRich`.
717
-
718
- ```js
719
- await conn.sendMessage(m.chat, {
720
- richCard: {
721
- thumbnail_url: 'https://example.com/profile.jpg',
722
- verification: true,
723
- title: 'PontaLabs',
724
- subtitle: 'Owner: Ponta',
725
- description: 'Ini Ownernya',
726
- entity_id: '6283857182374',
727
- entity_url: 'https://wa.me/6283857182374',
728
- profile_url: 'https://example.com/profile.jpg'
729
- }
730
- });
731
- ```
732
-
733
- | Property | Type | Description |
734
- |---|---|---|
735
- | `thumbnail_url` | `string` | Thumbnail Card |
736
- | `verification` | `boolean` | Status verified |
737
- | `title` | `string` | Judul Entity |
738
- | `subtitle` | `string` | Subjudul |
739
- | `description` | `string` | Deskripsi |
740
- | `entity_id` | `string` | ID Entity |
741
- | `entity_url` | `string` | URL Entity |
742
- | `profile_url` | `string` | URL fallback/profile |
743
-
744
- </details>
745
-
746
464
 
747
465
  <details>
748
- <summary><b>💻 Rich Code — <code>code</code> / <code>codes</code> / <code>richCode</code></b></summary>
749
-
750
- **Single block:**
466
+ <summary><b>👤 Rich Card — <code>richCard</code></b></summary>
751
467
 
752
- ```js
753
- await sock.sendMessage(jid, {
754
- code: 'console.log("Hello World")',
755
- language: 'javascript'
756
- }, { quoted: message })
757
- ```
468
+ Entity card / profile preview yang dirender sebagai AI message. Cocok untuk menampilkan kontak, channel, atau brand profile tanpa perlu builder terpisah.
758
469
 
759
- **Multiple blocks:**
470
+ **Direct `sendMessage`:**
760
471
 
761
472
  ```js
762
473
  await sock.sendMessage(jid, {
763
- codes: [
764
- { code: 'console.log("hello")', language: 'javascript' },
765
- { code: 'SELECT * FROM users;', language: 'sql' }
766
- ]
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
+ }
767
484
  }, { quoted: message })
768
485
  ```
769
486
 
@@ -772,12 +489,32 @@ await sock.sendMessage(jid, {
772
489
  ```js
773
490
  await sock.sendMessage(jid, {
774
491
  items: [
775
- build.richCode('console.log("hello")', 'javascript')
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
+ })
776
502
  ]
777
503
  })
778
504
  ```
779
505
 
780
- **Supported language aliases:** `javascript`, `js`, `typescript`, `ts`, `python`, `py`, `bash`, `sh`, `zsh`, `go`, `golang`, `rust`, `rs`, `c`, `h`, `cpp`, `c++`, `csharp`, `cs`, `css`, `html`, `powershell`, `ps1`, `cmd`, `bat`, `sql`, `json`.
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 |
516
+
517
+ > Gunakan URL thumbnail yang valid dan dapat diakses publik. `entity_id` harus dalam format nomor internasional tanpa `+`.
781
518
 
782
519
  </details>
783
520
 
@@ -979,8 +716,8 @@ await sock.sendMessage(jid, {
979
716
  await sock.sendMessage(jid, {
980
717
  items: [
981
718
  build.richProduct({
982
- title: 'Produk A',
983
- price_display_string: 'Rp 99.000'
719
+ title: 'Sepatu A',
720
+ price_display_string: 'Rp 500.000'
984
721
  })
985
722
  ]
986
723
  })
@@ -1094,7 +831,7 @@ await sock.sendMessage(jid, {
1094
831
  await sock.sendMessage(jid, {
1095
832
  items: [
1096
833
  build.richSource([
1097
- ['https://example.com/favicon.ico', 'https://example.com', 'Example']
834
+ ['https://wikipedia.org/favicon.ico', 'https://wikipedia.org/wiki/Node.js', 'Wikipedia']
1098
835
  ])
1099
836
  ]
1100
837
  })
@@ -1173,7 +910,7 @@ await sock.sendMessage(jid, {
1173
910
  ['Messages', '1.2K']
1174
911
  ]
1175
912
  }},
1176
- build.richCode('SELECT COUNT(*) FROM messages;', 'sql'),
913
+ build.richText('SELECT COUNT(*) FROM messages;'),
1177
914
  build.richHtml('<h2>Dashboard</h2>'),
1178
915
  build.richSuggest('Refresh'),
1179
916
  build.richFooter('Auto-generated · PontaLabs')
@@ -1187,7 +924,6 @@ await sock.sendMessage(jid, {
1187
924
  <summary><b>📋 Lihat semua key <code>items</code></b></summary>
1188
925
 
1189
926
  - `{ text, inlineEntities? }` — Rich text
1190
- - `{ code, language }` — Code block
1191
927
  - `{ table }` — Table
1192
928
  - `{ images }` — Image grid
1193
929
  - `{ videoUrl, mimeType?, duration? }` — Video
@@ -1237,11 +973,9 @@ await sock.sendMessage(jid, {
1237
973
  reference_display_name: 'nodejs.org',
1238
974
  sources: [{
1239
975
  source_type: 'THIRD_PARTY',
1240
- source_display_name: 'nodejs.org',
1241
- source_subtitle: 'nodejs.org',
976
+ source_display_name: 'Node.js',
1242
977
  source_url: 'https://nodejs.org'
1243
- }],
1244
- __typename: 'GenAISearchCitationItem'
978
+ }]
1245
979
  }
1246
980
  }]
1247
981
  }]
@@ -1253,12 +987,14 @@ await sock.sendMessage(jid, {
1253
987
  ```js
1254
988
  await sock.sendMessage(jid, {
1255
989
  richResponse: [{
1256
- table: [
1257
- { items: ['Version', 'LTS', 'Release'], isHeading: true },
1258
- { items: ['22.x', 'Yes', '2024'], isHeading: false }
1259
- ]
990
+ table: {
991
+ items: [
992
+ { items: ['Name', 'Role'], isHeading: true },
993
+ { items: ['Ponta', 'Admin'] }
994
+ ]
995
+ }
1260
996
  }]
1261
- })
997
+ }, { quoted: message })
1262
998
  ```
1263
999
 
1264
1000
  > Berbeda dari `table` top-level / `items`, format table di `richResponse` harus berupa array row siap-pakai.
@@ -1304,17 +1040,22 @@ await sock.sendMessage(jid, {
1304
1040
 
1305
1041
  ```js
1306
1042
  const carousel = build.carousel()
1307
- .setBody('Pilih produk')
1308
- .setFooter('PontaLabs')
1309
- .addCard(card)
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
+ )
1310
1053
 
1311
1054
  await sock.sendMessage(jid, {
1312
1055
  items: [carousel]
1313
1056
  })
1314
1057
  ```
1315
1058
 
1316
- > `build.button()`, `build.buttonV2()`, dan `build.carousel()` tidak membutuhkan `sock` saat dibuat. Builder hanya menghasilkan payload.
1317
-
1318
1059
  </details>
1319
1060
 
1320
1061
  <details>
@@ -1348,8 +1089,6 @@ await sock.sendMessage(jid, {
1348
1089
  })
1349
1090
  ```
1350
1091
 
1351
- > `buildDelay` hanya berlaku untuk `items` dan nilainya harus lebih besar dari `0`.
1352
-
1353
1092
  </details>
1354
1093
 
1355
1094
  <details>
@@ -1456,39 +1195,19 @@ const newsletter = await sock.newsletterMetadata('jid', '120363282083849178@news
1456
1195
  </details>
1457
1196
 
1458
1197
  <details>
1459
- <summary><b>👆 Follow / Unfollow / Mute / Unmute</b></summary>
1460
-
1461
- ```js
1462
- const nlJid = '120363282083849178@newsletter'
1463
-
1464
- await sock.newsletterFollow(nlJid)
1465
- await sock.newsletterUnfollow(nlJid)
1466
- await sock.newsletterMute(nlJid)
1467
- await sock.newsletterUnmute(nlJid)
1468
- ```
1469
- </details>
1470
-
1471
- <details>
1472
- <summary><b>📣 Create Newsletter</b></summary>
1198
+ <summary><b>➕ Follow / Unfollow Newsletter</b></summary>
1473
1199
 
1474
1200
  ```js
1475
- const newsletter = await sock.newsletterCreate(
1476
- 'Newsletter Name',
1477
- 'Description here',
1478
- { url: 'https://example.com/image.jpg' }
1479
- )
1201
+ await sock.newsletterFollow('120363282083849178@newsletter')
1202
+ await sock.newsletterUnfollow('120363282083849178@newsletter')
1480
1203
  ```
1481
1204
  </details>
1482
1205
 
1483
1206
  <details>
1484
- <summary><b>🌟 React to Newsletter Post</b></summary>
1207
+ <summary><b>📨 Newsletter Reaction</b></summary>
1485
1208
 
1486
1209
  ```js
1487
- await sock.newsletterReactMessage(
1488
- '120363282083849178@newsletter',
1489
- '12', // server message ID
1490
- '🦖' // emoji
1491
- )
1210
+ await sock.newsletterReactMessage('120363282083849178@newsletter', '123', '🔥')
1492
1211
  ```
1493
1212
  </details>
1494
1213
 
@@ -1497,15 +1216,11 @@ await sock.newsletterReactMessage(
1497
1216
  ## 👥 Groups
1498
1217
 
1499
1218
  <details>
1500
- <summary><b>🔄 Create Group</b></summary>
1219
+ <summary><b>📝 Create Group</b></summary>
1501
1220
 
1502
1221
  ```js
1503
- const group = await sock.groupCreate('Group Title', [
1504
- '1234567890@s.whatsapp.net',
1505
- '0987654321@s.whatsapp.net'
1506
- ])
1507
-
1508
- console.log('Group JID:', group.id)
1222
+ const group = await sock.groupCreate('My Group', ['1234567890@s.whatsapp.net'])
1223
+ console.log('Group ID:', group.id)
1509
1224
  ```
1510
1225
  </details>
1511
1226
 
@@ -1705,6 +1420,14 @@ const summary = getAggregateResponsesInEventMessage(eventMsg, sock.user.lid)
1705
1420
 
1706
1421
  ## 🤝 Contributing
1707
1422
 
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
+
1708
1431
  1. **Fork** repository
1709
1432
  2. Create a feature branch: `git checkout -b feat/your-feature`
1710
1433
  3. Commit your changes: `git commit -m "feat: add something awesome"`
@@ -1715,6 +1438,10 @@ const summary = getAggregateResponsesInEventMessage(eventMsg, sock.user.lid)
1715
1438
 
1716
1439
  ## 📜 License
1717
1440
 
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
+
1718
1445
  This project is licensed for **personal and non-commercial use only**.
1719
1446
 
1720
1447
  | | |
@@ -1724,6 +1451,8 @@ This project is licensed for **personal and non-commercial use only**.
1724
1451
  | ❌ | Commercial use strictly prohibited |
1725
1452
  | ❌ | Resale or rebranding prohibited |
1726
1453
 
1454
+ </div>
1455
+
1727
1456
  ---
1728
1457
 
1729
1458
  ## ⚠️ Disclaimer
@@ -1735,10 +1464,16 @@ This project is licensed for **personal and non-commercial use only**.
1735
1464
 
1736
1465
  <div align="center">
1737
1466
 
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
+
1738
1469
  [📦 NPM](https://www.npmjs.com/package/@pontalabs/baileys) · [📖 Baileys Wiki](https://github.com/WhiskeySockets/Baileys/wiki) · [⭐ Star this repo](#)
1739
1470
 
1740
1471
  <br>
1741
1472
 
1742
- Made with by **PontaCT**
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" />
1743
1478
 
1744
1479
  </div>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pontalabs/baileys",
3
3
  "type": "module",
4
- "version": "1.2.5",
4
+ "version": "1.2.6",
5
5
  "description": "PontaLabs Baileys is a lightweight, modern, and customizable WhatsApp Web API library built on Baileys.",
6
6
  "keywords": [
7
7
  "whatsapp",