@pontasockets/baileys 0.2.6 → 0.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 +37 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -486,7 +486,10 @@ await sock.sendMessage(jid, {
|
|
|
486
486
|
|
|
487
487
|
> **Tipe yang valid di dalam `items`:**
|
|
488
488
|
> - `{ text: 'string' }` — teks / markdown
|
|
489
|
-
> -
|
|
489
|
+
> - `{ code: 'string', language: 'string' }` — code block
|
|
490
|
+
> - `{ table: { title?, headers?, rows } }` — tabel
|
|
491
|
+
|
|
492
|
+
</details>
|
|
490
493
|
|
|
491
494
|
<details>
|
|
492
495
|
<summary><b>🔗 Inline Citation Message <kbd>NEW</kbd></b></summary>
|
|
@@ -494,6 +497,12 @@ await sock.sendMessage(jid, {
|
|
|
494
497
|
|
|
495
498
|
> Render teks dengan citation/footnote yang bisa diklik — mirip jawaban AI WhatsApp yang punya referensi sumber
|
|
496
499
|
|
|
500
|
+
**Format citation di teks:** `{{KEY}}N{{/KEY}}`
|
|
501
|
+
- `KEY` harus cocok dengan field `key` di `inlineEntities`
|
|
502
|
+
- `N` adalah nomor urut footnote (¹²³ atau 1 2 3)
|
|
503
|
+
|
|
504
|
+
---
|
|
505
|
+
|
|
497
506
|
**Single citation**
|
|
498
507
|
|
|
499
508
|
```javascript
|
|
@@ -537,7 +546,12 @@ await sock.sendMessage(jid, {
|
|
|
537
546
|
reference_url: 'https://nodejs.org',
|
|
538
547
|
reference_title: 'Node.js Official',
|
|
539
548
|
reference_display_name: 'nodejs.org',
|
|
540
|
-
sources: [{
|
|
549
|
+
sources: [{
|
|
550
|
+
source_type: 'THIRD_PARTY',
|
|
551
|
+
source_display_name: 'nodejs.org',
|
|
552
|
+
source_subtitle: 'nodejs.org',
|
|
553
|
+
source_url: 'https://nodejs.org'
|
|
554
|
+
}],
|
|
541
555
|
__typename: 'GenAISearchCitationItem'
|
|
542
556
|
}
|
|
543
557
|
},
|
|
@@ -548,7 +562,12 @@ await sock.sendMessage(jid, {
|
|
|
548
562
|
reference_url: 'https://wikipedia.org/wiki/Ryan_Dahl',
|
|
549
563
|
reference_title: 'Ryan Dahl - Wikipedia',
|
|
550
564
|
reference_display_name: 'Wikipedia',
|
|
551
|
-
sources: [{
|
|
565
|
+
sources: [{
|
|
566
|
+
source_type: 'THIRD_PARTY',
|
|
567
|
+
source_display_name: 'Wikipedia',
|
|
568
|
+
source_subtitle: 'wikipedia.org',
|
|
569
|
+
source_url: 'https://wikipedia.org/wiki/Ryan_Dahl'
|
|
570
|
+
}],
|
|
552
571
|
__typename: 'GenAISearchCitationItem'
|
|
553
572
|
}
|
|
554
573
|
}
|
|
@@ -572,23 +591,31 @@ await sock.sendMessage(jid, {
|
|
|
572
591
|
reference_url: 'https://nodejs.org/en/download',
|
|
573
592
|
reference_title: 'Download Node.js',
|
|
574
593
|
reference_display_name: 'nodejs.org',
|
|
575
|
-
sources: [{
|
|
594
|
+
sources: [{
|
|
595
|
+
source_type: 'THIRD_PARTY',
|
|
596
|
+
source_display_name: 'nodejs.org',
|
|
597
|
+
source_subtitle: 'nodejs.org',
|
|
598
|
+
source_url: 'https://nodejs.org/en/download'
|
|
599
|
+
}],
|
|
576
600
|
__typename: 'GenAISearchCitationItem'
|
|
577
601
|
}
|
|
578
602
|
}]
|
|
579
603
|
},
|
|
580
|
-
{
|
|
581
|
-
|
|
604
|
+
{
|
|
605
|
+
code: 'curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -\napt-get install -y nodejs',
|
|
606
|
+
language: 'bash'
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
text: '_Verifikasi instalasi dengan_ `node --version`'
|
|
610
|
+
}
|
|
582
611
|
]
|
|
583
612
|
}, { quoted: message })
|
|
584
613
|
```
|
|
585
614
|
|
|
586
|
-
> **
|
|
587
|
-
|
|
588
|
-
> **`richResponse` array** support semua tipe yang sama dengan `items`:
|
|
615
|
+
> **Tipe yang valid di dalam `richResponse`:**
|
|
589
616
|
> - `{ text, inlineEntities? }` — teks / markdown dengan optional citation
|
|
590
617
|
> - `{ code, language }` — code block
|
|
591
|
-
> - `{ table, title? }` — tabel
|
|
618
|
+
> - `{ table, title? }` — tabel, `table` berupa `[{ items: string[], isHeading?: bool }, ...]`
|
|
592
619
|
|
|
593
620
|
</details>`{ code: 'string', language: 'string' }` — code block
|
|
594
621
|
> - `{ table: { title?, headers?, rows } }` — tabel
|