@nuiisweety/baileys 0.1.3 → 0.1.5

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,70 +1,109 @@
1
- <h1 align="center">✨@nuiisweety/baileys</h1>
2
-
3
1
  <div align="center">
4
- <img src="https://raw.githubusercontent.com/NuiiS4TORU/-nuisockets/refs/heads/main/nuiisweety.png" width="100%"/>
5
- </div>
6
2
 
7
- <div align="center">
8
- <i>✨ Fork manis dari <code>@whiskeysockets/baileys</code> v7.0.0-rc11 &mdash; dikembangkan dengan sepenuh hati oleh <b>NuiiS4TORU</b> 💖</i>
9
- </div>
3
+ <img src="https://raw.githubusercontent.com/NuiiS4TORU/-nuisockets/refs/heads/main/nuiisweety.png" width="100%"/>
10
4
 
11
- <br/>
5
+ # @nuiisweety/baileys
6
+
7
+ *Fork dari [`@whiskeysockets/baileys`](https://github.com/WhiskeySockets/Baileys) v7.0.0-rc11*
8
+ *dikembangkan dengan sepenuh hati oleh **NuiiS4TORU***
9
+
10
+ [![npm version](https://img.shields.io/badge/npm-0.1.4-pink?style=flat-square&logo=npm)](https://www.npmjs.com/package/@nuiisweety/baileys)
11
+ [![license](https://img.shields.io/badge/license-MIT-lavender?style=flat-square)](LICENSE)
12
+ [![based on](https://img.shields.io/badge/based%20on-@whiskeysockets%2Fbaileys-orchid?style=flat-square)](https://github.com/WhiskeySockets/Baileys)
12
13
 
13
- <div align="center">
14
- <blockquote>
15
- 🌷 <b>@nuiisweety/baileys hanya pernah bercabang dari satu sumber yang ia percaya, yaitu <a href="https://github.com/WhiskeySockets/Baileys">@whiskeysockets/baileys</a>.</b><br/>
16
- Setiap modifikasi adalah buah dari pengembangan mandiri yang penuh dedikasi~ 🍀
17
- </blockquote>
18
14
  </div>
19
15
 
20
16
  ---
21
17
 
22
- ## 🗺️ Navigasi Sayang
18
+ ## Navigasi
23
19
 
24
- <div align="center">
20
+ <table>
21
+ <tr>
22
+ <td width="50%" valign="top">
25
23
 
26
- **🔌 Koneksi**
27
- [QR Code](#-koneksi-qr-code) &nbsp;·&nbsp; [Pairing Code](#-koneksi-pairing-code) &nbsp;·&nbsp; [Browser Identity](#️-browser-identity) &nbsp;·&nbsp; [Opsi Koneksi](#️-opsi-koneksi)
24
+ **Koneksi & Setup**
25
+ - [Instalasi](#instalasi)
26
+ - [QR Code](#koneksi-qr-code)
27
+ - [Pairing Code](#koneksi-pairing-code)
28
+ - [Browser Identity](#browser-identity)
29
+ - [Opsi Koneksi](#opsi-koneksi)
28
30
 
29
- **📨 Handle Pesan**
30
- [Terima Pesan](#-terima-pesan) &nbsp;·&nbsp; [Handle Grup](#-handle-grup)
31
+ **Handle Pesan**
32
+ - [Terima Pesan](#terima-pesan)
33
+ - [Handle Grup](#handle-grup)
31
34
 
32
- **💌 Kirim Pesan**
33
- [Teks](#-teks) &nbsp;·&nbsp; [Gambar](#️-gambar) &nbsp;·&nbsp; [Video](#-video) &nbsp;·&nbsp; [Audio & Voice Note](#-audio--voice-note) &nbsp;·&nbsp; [Dokumen](#-dokumen) &nbsp;·&nbsp; [Sticker](#-sticker) &nbsp;·&nbsp; [Lokasi](#-lokasi) &nbsp;·&nbsp; [Kontak](#-kontak)
35
+ **Kirim Pesan**
36
+ - [Teks](#teks) · [Gambar](#gambar) · [Video](#video)
37
+ - [Audio & Voice Note](#audio--voice-note)
38
+ - [Dokumen](#dokumen) · [Sticker](#sticker)
39
+ - [Lokasi](#lokasi) · [Kontak](#kontak)
34
40
 
35
- **💞 Interaksi**
36
- [Reaksi](#-reaksi) &nbsp;·&nbsp; [Poll](#️-poll) &nbsp;·&nbsp; [Poll Result](#-poll-result) &nbsp;·&nbsp; [Poll Update](#️-poll-update) &nbsp;·&nbsp; [Forward](#️-forward) &nbsp;·&nbsp; [Hapus](#️-hapus-pesan) &nbsp;·&nbsp; [Edit](#️-edit-pesan) &nbsp;·&nbsp; [Pin](#-pin-pesan)
41
+ **Interaksi**
42
+ - [Reaksi](#reaksi) · [Poll](#poll) · [Poll Result](#poll-result)
43
+ - [Poll Update](#poll-update) · [Forward](#forward)
44
+ - [Hapus](#hapus-pesan) · [Edit](#edit-pesan) · [Pin](#pin-pesan)
37
45
 
38
- **🌺 Tambahan**
39
- [Album](#️-album) &nbsp;·&nbsp; [Event](#-event) &nbsp;·&nbsp; [Group Status](#-group-status--group-story) &nbsp;·&nbsp; [Status Mention](#️-status-mention) &nbsp;·&nbsp; [Flow Reply](#-flow-reply) &nbsp;·&nbsp; [Button Reply](#-button-reply) &nbsp;·&nbsp; [Keep In Chat](#-keep-in-chat) &nbsp;·&nbsp; [Scheduled Call](#-scheduled-call) &nbsp;·&nbsp; [Group Invite](#-group-invite) &nbsp;·&nbsp; [Product](#️-product)
46
+ </td>
47
+ <td width="50%" valign="top">
40
48
 
41
- **🎀 Wrapper**
42
- [View Once](#️-view-once) &nbsp;·&nbsp; [View Once V2](#️-view-once-v2) &nbsp;·&nbsp; [Ephemeral](#️-ephemeral) &nbsp;·&nbsp; [Spoiler](#-spoiler) &nbsp;·&nbsp; [Group Status Wrap](#-group-status-wrap) &nbsp;·&nbsp; [Lottie Sticker](#-lottie-sticker) &nbsp;·&nbsp; [AI Icon](#-ai-icon) &nbsp;·&nbsp; [Secure Meta Label](#️-secure-meta-service-label)
49
+ **Fitur Tambahan**
50
+ - [Album](#album) · [Event](#event)
51
+ - [Group Status / Story](#group-status--group-story)
52
+ - [Status Mention](#status-mention)
53
+ - [Flow Reply](#flow-reply) · [Button Reply](#button-reply)
54
+ - [Keep In Chat](#keep-in-chat) · [Scheduled Call](#scheduled-call)
55
+ - [Group Invite](#group-invite) · [Product](#product)
43
56
 
44
- **✨ Interactive**
45
- [Buttons](#-buttons) &nbsp;·&nbsp; [List Message](#-list-message) &nbsp;·&nbsp; [Template Buttons](#️-template-buttons) &nbsp;·&nbsp; [Native Flow](#-native-flow) &nbsp;·&nbsp; [Carousel](#-carousel)
57
+ **Wrapper**
58
+ - [View Once](#view-once) · [View Once V2](#view-once-v2)
59
+ - [Ephemeral](#ephemeral) · [Spoiler](#spoiler)
60
+ - [Group Status Wrap](#group-status-wrap)
61
+ - [Lottie Sticker](#lottie-sticker) · [AI Icon](#ai-icon)
62
+ - [Secure Meta Label](#secure-meta-service-label)
46
63
 
47
- **🌟 Rich Message (AI)**
48
- [Code Block](#-code-block) &nbsp;·&nbsp; [Links](#-links-rich) &nbsp;·&nbsp; [Table](#-table-rich) &nbsp;·&nbsp; [Grid Image](#%EF%B8%8F-grid-image-rich) &nbsp;·&nbsp; [Inline Image](#%EF%B8%8F-inline-image-rich) &nbsp;·&nbsp; [Dynamic / GIF](#-dynamic--gif-rich) &nbsp;·&nbsp; [Map](#%EF%B8%8F-map-rich) &nbsp;·&nbsp; [LaTeX](#-latex-rich) &nbsp;·&nbsp; [Content Items](#-content-items-rich) &nbsp;·&nbsp; [Rich Response (Gabungan)](#-rich-response-gabungan) &nbsp;·&nbsp; [Terima & Decode](#-terima--decode-rich-message) &nbsp;·&nbsp; [Bahasa Kode](#-bahasa-yang-didukung)
64
+ **Interactive**
65
+ - [Buttons](#buttons) · [List Message](#list-message)
66
+ - [Template Buttons](#template-buttons)
67
+ - [Native Flow](#native-flow) · [Carousel](#carousel)
49
68
 
50
- **🍃 Lainnya**
51
- [List Reply](#-list-reply) &nbsp;·&nbsp; [Sticker Pack](#-sticker-pack) &nbsp;·&nbsp; [External Ad Reply](#-external-ad-reply) &nbsp;·&nbsp; [Request Payment](#-request-payment) &nbsp;·&nbsp; [Invoice](#-invoice) &nbsp;·&nbsp; [Order](#-order) &nbsp;·&nbsp; [Disappearing Messages](#-disappearing-messages) &nbsp;·&nbsp; [Raw Message](#-raw-message)
69
+ **Rich Message (AI)**
70
+ - [Text](#addtext) · [Code Block](#addcode) · [Table](#addtable)
71
+ - [Image](#addimage) · [Video](#addvideo) · [Source](#addsource)
72
+ - [Reels](#addreels) · [Product Card](#addproduct) · [Post](#addpost)
73
+ - [Tip](#addtip) · [Suggest](#addsuggest) · [Map](#map-rich)
74
+ - [LaTeX](#latex-rich) · [Grid Image](#grid-image-rich)
75
+ - [Inline Image](#inline-image-rich) · [Dynamic/GIF](#dynamic--gif-rich)
76
+ - [Content Items](#content-items-rich)
77
+ - [Gabungan (richResponse)](#rich-response-gabungan)
78
+ - [Terima & Decode](#terima--decode-rich-message)
52
79
 
53
- </div>
80
+ **Lainnya**
81
+ - [List Reply](#list-reply) · [Sticker Pack](#sticker-pack)
82
+ - [External Ad Reply](#external-ad-reply)
83
+ - [Request Payment](#request-payment)
84
+ - [Invoice](#invoice) · [Order](#order)
85
+ - [Disappearing Messages](#disappearing-messages)
86
+ - [Raw Message](#raw-message)
87
+
88
+ </td>
89
+ </tr>
90
+ </table>
54
91
 
55
92
  ---
56
93
 
57
- ## 🌸 Instalasi
94
+ ## Instalasi
58
95
 
59
96
  ```js
97
+ // CommonJS
60
98
  const { default: makeWASocket } = require('@nuiisweety/baileys')
61
- // atau ESM 🌿
99
+
100
+ // ESM
62
101
  import makeWASocket from '@nuiisweety/baileys'
63
102
  ```
64
103
 
65
104
  ---
66
105
 
67
- ## 🔌 Koneksi QR Code
106
+ ## Koneksi QR Code
68
107
 
69
108
  ```js
70
109
  const {
@@ -90,7 +129,7 @@ async function start() {
90
129
  const code = lastDisconnect?.error?.output?.statusCode
91
130
  if (code !== DisconnectReason.loggedOut) start()
92
131
  } else if (connection === 'open') {
93
- console.log('💖 Terhubung dengan indah!')
132
+ console.log('Connected!')
94
133
  }
95
134
  })
96
135
  }
@@ -99,16 +138,12 @@ start()
99
138
 
100
139
  ---
101
140
 
102
- ## 🔑 Koneksi Pairing Code
141
+ ## Koneksi Pairing Code
103
142
 
104
- > 🌷 Cocok untuk server/VPS tanpa tampilan terminal — tetap bisa terhubung dengan elegan~
143
+ > Cocok untuk server/VPS tanpa tampilan terminal.
105
144
 
106
145
  ```js
107
- const sock = makeWASocket({
108
- version,
109
- auth: state,
110
- printQRInTerminal: false
111
- })
146
+ const sock = makeWASocket({ version, auth: state, printQRInTerminal: false })
112
147
 
113
148
  sock.ev.on('creds.update', saveCreds)
114
149
  sock.ev.on('connection.update', ({ connection, lastDisconnect }) => {
@@ -117,41 +152,36 @@ sock.ev.on('connection.update', ({ connection, lastDisconnect }) => {
117
152
  }
118
153
  })
119
154
 
120
- // 💌 Nomor HP format internasional tanpa +
155
+ // Nomor HP format internasional tanpa +
121
156
  if (!sock.authState.creds.registered) {
122
157
  const code = await sock.requestPairingCode('628123456789')
123
- console.log('🌸 Pairing code:', code)
124
- // Masukkan di WA → Perangkat Tertaut → Tautkan Perangkat
158
+ console.log('Pairing code:', code)
125
159
  }
126
- ```
127
-
128
- > 🍀 Pairing code kadaluarsa dalam beberapa menit. Jalankan ulang jika gagal ya~
129
160
 
130
- **🎀 Custom pairing code (8 karakter):**
131
- ```js
161
+ // Custom pairing code (8 karakter)
132
162
  const code = await sock.requestPairingCode('628123456789', 'NUYY2822')
133
163
  ```
134
164
 
135
165
  ---
136
166
 
137
- ## 🖥️ Browser Identity
167
+ ## Browser Identity
138
168
 
139
169
  ```js
140
170
  const { Browsers } = require('@nuiisweety/baileys')
141
171
 
142
172
  makeWASocket({
143
- browser: Browsers.macOS('Chrome'), // 🍎 Mac OS — Chrome
144
- browser: Browsers.macOS('Firefox'), // 🦊 Mac OS — Firefox
145
- browser: Browsers.windows('Chrome'), // 🪟 Windows — Chrome
146
- browser: Browsers.ubuntu('Chrome'), // 🐧 Ubuntu — Chrome
147
- browser: Browsers.baileys('Chrome'), // 🌸 Baileys — Chrome
148
- browser: ['MyBot', 'Chrome', '1.0.0'] // custom
173
+ browser: Browsers.macOS('Chrome'), // Mac OS — Chrome
174
+ browser: Browsers.macOS('Firefox'), // Mac OS — Firefox
175
+ browser: Browsers.windows('Chrome'), // Windows — Chrome
176
+ browser: Browsers.ubuntu('Chrome'), // Ubuntu — Chrome
177
+ browser: Browsers.baileys('Chrome'), // Baileys — Chrome
178
+ browser: ['MyBot', 'Chrome', '1.0.0'] // custom
149
179
  })
150
180
  ```
151
181
 
152
182
  ---
153
183
 
154
- ## ⚙️ Opsi Koneksi
184
+ ## Opsi Koneksi
155
185
 
156
186
  ```js
157
187
  makeWASocket({
@@ -171,7 +201,7 @@ makeWASocket({
171
201
 
172
202
  ---
173
203
 
174
- ## 📥 Terima Pesan
204
+ ## Terima Pesan
175
205
 
176
206
  ```js
177
207
  sock.ev.on('messages.upsert', async ({ messages, type }) => {
@@ -185,17 +215,13 @@ sock.ev.on('messages.upsert', async ({ messages, type }) => {
185
215
  const isGroup = jid.endsWith('@g.us')
186
216
  const sender = isGroup ? m.key.participant : jid
187
217
 
188
- // 💬 Ambil teks
189
218
  const text =
190
219
  m.message.conversation ||
191
220
  m.message.extendedTextMessage?.text ||
192
221
  m.message.imageMessage?.caption ||
193
222
  m.message.videoMessage?.caption || ''
194
223
 
195
- // 👀 Tandai dibaca
196
224
  await sock.readMessages([m.key])
197
-
198
- // 🌸 Typing indicator
199
225
  await sock.sendPresenceUpdate('composing', jid)
200
226
  }
201
227
  })
@@ -203,39 +229,39 @@ sock.ev.on('messages.upsert', async ({ messages, type }) => {
203
229
 
204
230
  ---
205
231
 
206
- ## 👥 Handle Grup
232
+ ## Handle Grup
207
233
 
208
234
  ```js
209
- // 🌷 Anggota masuk/keluar
235
+ // Anggota masuk/keluar
210
236
  sock.ev.on('group-participants.update', ({ id, participants, action }) => {
211
237
  // action: 'add' | 'remove' | 'promote' | 'demote'
212
238
  })
213
239
 
214
- // 📝 Info grup diupdate
240
+ // Info grup diupdate
215
241
  sock.ev.on('groups.update', updates => {})
216
242
 
217
- // 🔍 Metadata grup
243
+ // Metadata grup
218
244
  const meta = await sock.groupMetadata(groupJid)
219
245
  console.log(meta.subject, meta.participants)
220
246
 
221
- // 🌸 Semua grup
247
+ // Semua grup
222
248
  const groups = await sock.groupFetchAllParticipating()
223
249
 
224
- // 💞 Tambah / keluarkan / promote / demote
250
+ // Tambah / keluarkan / promote / demote
225
251
  await sock.groupParticipantsUpdate(groupJid, ['628xxx@s.whatsapp.net'], 'add')
226
252
  await sock.groupParticipantsUpdate(groupJid, ['628xxx@s.whatsapp.net'], 'remove')
227
253
  await sock.groupParticipantsUpdate(groupJid, ['628xxx@s.whatsapp.net'], 'promote')
228
254
  await sock.groupParticipantsUpdate(groupJid, ['628xxx@s.whatsapp.net'], 'demote')
229
255
 
230
- // ✏️ Ubah nama / deskripsi
256
+ // Ubah nama / deskripsi
231
257
  await sock.groupUpdateSubject(groupJid, 'Nama Baru')
232
258
  await sock.groupUpdateDescription(groupJid, 'Deskripsi baru')
233
259
 
234
- // 🔒 Kunci / buka grup
260
+ // Kunci / buka grup
235
261
  await sock.groupSettingUpdate(groupJid, 'announcement')
236
262
  await sock.groupSettingUpdate(groupJid, 'not_announcement')
237
263
 
238
- // 📣 Mention semua anggota
264
+ // Mention semua anggota
239
265
  const meta2 = await sock.groupMetadata(groupJid)
240
266
  const members = meta2.participants.map(p => p.id)
241
267
  await sock.sendMessage(groupJid, {
@@ -246,12 +272,12 @@ await sock.sendMessage(groupJid, {
246
272
 
247
273
  ---
248
274
 
249
- ## 💬 Teks
275
+ ## Teks
250
276
 
251
277
  ```js
252
- await sock.sendMessage(jid, { text: 'Halo sayang~ 🌸' })
278
+ await sock.sendMessage(jid, { text: 'Halo!' })
253
279
 
254
- // 💌 Dengan mention
280
+ // Dengan mention
255
281
  await sock.sendMessage(jid, {
256
282
  text: '@628xxx halo!',
257
283
  mentions: ['628xxx@s.whatsapp.net']
@@ -260,34 +286,34 @@ await sock.sendMessage(jid, {
260
286
 
261
287
  ---
262
288
 
263
- ## 🖼️ Gambar
289
+ ## Gambar
264
290
 
265
291
  ```js
266
- // 🌐 URL
292
+ // URL
267
293
  await sock.sendMessage(jid, {
268
294
  image: { url: 'https://example.com/image.jpg' },
269
- caption: 'Keterangan 🌷'
295
+ caption: 'Keterangan'
270
296
  })
271
297
 
272
- // 📁 Buffer / file
298
+ // Buffer
273
299
  await sock.sendMessage(jid, {
274
300
  image: fs.readFileSync('image.jpg'),
275
- caption: 'Keterangan 💖'
301
+ caption: 'Keterangan'
276
302
  })
277
303
  ```
278
304
 
279
305
  ---
280
306
 
281
- ## 🎥 Video
307
+ ## Video
282
308
 
283
309
  ```js
284
310
  await sock.sendMessage(jid, {
285
311
  video: { url: 'https://example.com/video.mp4' },
286
- caption: 'Keterangan 🌸',
287
- gifPlayback: false // true = GIF looping 🔁
312
+ caption: 'Keterangan',
313
+ gifPlayback: false // true = GIF looping
288
314
  })
289
315
 
290
- // 🎞️ Video note (bubble)
316
+ // Video note (bubble)
291
317
  await sock.sendMessage(jid, {
292
318
  video: fs.readFileSync('video.mp4'),
293
319
  ptv: true
@@ -296,16 +322,16 @@ await sock.sendMessage(jid, {
296
322
 
297
323
  ---
298
324
 
299
- ## 🎵 Audio & Voice Note
325
+ ## Audio & Voice Note
300
326
 
301
327
  ```js
302
- // 🎶 Audio biasa
328
+ // Audio biasa
303
329
  await sock.sendMessage(jid, {
304
330
  audio: { url: 'https://example.com/audio.mp3' },
305
331
  mimetype: 'audio/mpeg'
306
332
  })
307
333
 
308
- // 🎙️ Voice note (PTT)
334
+ // Voice note (PTT)
309
335
  await sock.sendMessage(jid, {
310
336
  audio: fs.readFileSync('voice.ogg'),
311
337
  mimetype: 'audio/ogg; codecs=opus',
@@ -315,37 +341,35 @@ await sock.sendMessage(jid, {
315
341
 
316
342
  ---
317
343
 
318
- ## 📄 Dokumen
344
+ ## Dokumen
319
345
 
320
346
  ```js
321
347
  await sock.sendMessage(jid, {
322
348
  document: fs.readFileSync('file.pdf'),
323
349
  mimetype: 'application/pdf',
324
350
  fileName: 'dokumen.pdf',
325
- caption: 'File ini 🍃'
351
+ caption: 'File ini'
326
352
  })
327
353
  ```
328
354
 
329
355
  ---
330
356
 
331
- ## 🎭 Sticker
357
+ ## Sticker
332
358
 
333
359
  ```js
334
- await sock.sendMessage(jid, {
335
- sticker: fs.readFileSync('sticker.webp')
336
- })
360
+ await sock.sendMessage(jid, { sticker: fs.readFileSync('sticker.webp') })
337
361
  ```
338
362
 
339
363
  ---
340
364
 
341
- ## 📍 Lokasi
365
+ ## Lokasi
342
366
 
343
367
  ```js
344
368
  await sock.sendMessage(jid, {
345
369
  location: {
346
370
  degreesLatitude: -6.2088,
347
371
  degreesLongitude: 106.8456,
348
- name: 'Monas 🌟',
372
+ name: 'Monas',
349
373
  address: 'Jakarta Pusat'
350
374
  }
351
375
  })
@@ -353,12 +377,12 @@ await sock.sendMessage(jid, {
353
377
 
354
378
  ---
355
379
 
356
- ## 👤 Kontak
380
+ ## Kontak
357
381
 
358
382
  ```js
359
383
  await sock.sendMessage(jid, {
360
384
  contacts: {
361
- displayName: 'Nama 💕',
385
+ displayName: 'Nama',
362
386
  contacts: [{
363
387
  vcard: 'BEGIN:VCARD\nVERSION:3.0\nFN:Nama\nTEL:+62812345678\nEND:VCARD'
364
388
  }]
@@ -368,51 +392,48 @@ await sock.sendMessage(jid, {
368
392
 
369
393
  ---
370
394
 
371
- ## 😍 Reaksi
395
+ ## Reaksi
372
396
 
373
397
  ```js
374
- await sock.sendMessage(jid, { react: { text: '💖', key: m.key } })
375
- // 🌸 Hapus reaksi
398
+ await sock.sendMessage(jid, { react: { text: '❤️', key: m.key } })
399
+
400
+ // Hapus reaksi
376
401
  await sock.sendMessage(jid, { react: { text: '', key: m.key } })
377
402
  ```
378
403
 
379
404
  ---
380
405
 
381
- ## 🗳️ Poll
406
+ ## Poll
382
407
 
383
408
  ```js
384
409
  await sock.sendMessage(jid, {
385
410
  poll: {
386
- name: 'Pilih salah satu~ 🌷',
387
- values: ['Opsi A 🌸', 'Opsi B 🌺', 'Opsi C 🌼'],
388
- selectableCount: 1 // 0 = boleh pilih banyak 💞
411
+ name: 'Pilih salah satu',
412
+ values: ['Opsi A', 'Opsi B', 'Opsi C'],
413
+ selectableCount: 1 // 0 = boleh pilih banyak
389
414
  }
390
415
  })
391
- ```
392
416
 
393
- **🌟 Poll dengan fitur tambahan:**
394
- ```js
417
+ // Poll dengan fitur tambahan
395
418
  await sock.sendMessage(jid, {
396
419
  poll: {
397
- name: 'Nama Poll 💌',
420
+ name: 'Nama Poll',
398
421
  values: ['Opsi A', 'Opsi B'],
399
422
  selectableCount: 1,
400
- endDate: new Date('2025-12-31'), // 📅 tanggal berakhir
401
- hideVoter: true, // 🙈 sembunyikan nama pemilih
402
- canAddOption: false, // 🔒 larang tambah opsi
403
- toAnnouncementGroup: false // true = community announcement group (pollV2)
423
+ endDate: new Date('2025-12-31'),
424
+ hideVoter: true,
425
+ canAddOption: false,
426
+ toAnnouncementGroup: false
404
427
  }
405
428
  })
406
- ```
407
429
 
408
- **🧠 Quiz (Poll dengan jawaban benar):**
409
- ```js
430
+ // Quiz (Poll dengan jawaban benar)
410
431
  await sock.sendMessage(jid, {
411
432
  poll: {
412
- name: 'Ibu kota Indonesia? 🌏',
433
+ name: 'Ibu kota Indonesia?',
413
434
  values: ['Jakarta', 'Surabaya', 'Bandung'],
414
435
  selectableCount: 1,
415
- pollType: 1, // 1 = QUIZ 🎓
436
+ pollType: 1, // 1 = QUIZ
416
437
  correctAnswer: 'Jakarta'
417
438
  }
418
439
  })
@@ -420,29 +441,29 @@ await sock.sendMessage(jid, {
420
441
 
421
442
  ---
422
443
 
423
- ## 📊 Poll Result
444
+ ## Poll Result
424
445
 
425
446
  ```js
426
447
  await sock.sendMessage(jid, {
427
448
  pollResult: {
428
- name: 'Nama Poll 🌸',
449
+ name: 'Nama Poll',
429
450
  votes: [
430
- { name: 'Opsi A 💖', voteCount: 10 },
431
- { name: 'Opsi B 🌷', voteCount: 5 }
451
+ { name: 'Opsi A', voteCount: 10 },
452
+ { name: 'Opsi B', voteCount: 5 }
432
453
  ],
433
- pollType: 0 // 0 = POLL, 1 = QUIZ 🎓
454
+ pollType: 0 // 0 = POLL, 1 = QUIZ
434
455
  }
435
456
  })
436
457
  ```
437
458
 
438
459
  ---
439
460
 
440
- ## 🗳️ Poll Update
461
+ ## Poll Update
441
462
 
442
463
  ```js
443
464
  await sock.sendMessage(jid, {
444
465
  pollUpdate: {
445
- key: pollMessage.key, // 🗝️ key dari pesan poll yang mau di-vote
466
+ key: pollMessage.key,
446
467
  vote: encryptedVotePayload,
447
468
  metadata: optionalMetadata
448
469
  }
@@ -451,18 +472,18 @@ await sock.sendMessage(jid, {
451
472
 
452
473
  ---
453
474
 
454
- ## ↩️ Forward
475
+ ## Forward
455
476
 
456
477
  ```js
457
478
  await sock.sendMessage(jid, {
458
479
  forward: targetMessage,
459
- force: true // 💌 paksa tampil sebagai forwarded
480
+ force: true // paksa tampil sebagai forwarded
460
481
  })
461
482
  ```
462
483
 
463
484
  ---
464
485
 
465
- ## 🗑️ Hapus Pesan
486
+ ## Hapus Pesan
466
487
 
467
488
  ```js
468
489
  await sock.sendMessage(jid, { delete: m.key })
@@ -470,73 +491,72 @@ await sock.sendMessage(jid, { delete: m.key })
470
491
 
471
492
  ---
472
493
 
473
- ## ✏️ Edit Pesan
494
+ ## Edit Pesan
474
495
 
475
496
  ```js
476
497
  await sock.sendMessage(jid, {
477
- text: 'Teks yang sudah diedit dengan penuh kasih~ 🌸',
498
+ text: 'Teks yang sudah diedit',
478
499
  edit: m.key
479
500
  })
480
501
  ```
481
502
 
482
503
  ---
483
504
 
484
- ## 📌 Pin Pesan
505
+ ## Pin Pesan
485
506
 
486
507
  ```js
487
- // 📍 Pin
508
+ // Pin
488
509
  await sock.sendMessage(jid, {
489
510
  pin: m.key,
490
511
  type: 1,
491
- time: 86400 // 86400=1hr 🕐 | 604800=7hr 🕰️ | 2592000=30hr 📆
512
+ time: 86400 // 86400=1hr | 604800=7hr | 2592000=30hr
492
513
  })
493
- // 🪄 Unpin
514
+
515
+ // Unpin
494
516
  await sock.sendMessage(jid, { pin: m.key, type: 2 })
495
517
  ```
496
518
 
497
519
  ---
498
520
 
499
- ## 🖼️ Album
521
+ ## Album
500
522
 
501
523
  ```js
502
524
  await sock.sendMessage(jid, {
503
525
  album: [
504
- { image: { url: 'https://example.com/1.jpg' }, caption: 'Foto 1 🌸' },
505
- { image: { url: 'https://example.com/2.jpg' }, caption: 'Foto 2 🌷' },
506
- { video: { url: 'https://example.com/vid.mp4' }, caption: 'Video 💕' }
526
+ { image: { url: 'https://example.com/1.jpg' }, caption: 'Foto 1' },
527
+ { image: { url: 'https://example.com/2.jpg' }, caption: 'Foto 2' },
528
+ { video: { url: 'https://example.com/vid.mp4' }, caption: 'Video' }
507
529
  ]
508
530
  })
509
- // 🌺 minimal 2 media ya~
531
+ // minimal 2 media
510
532
  ```
511
533
 
512
534
  ---
513
535
 
514
- ## 📅 Event
536
+ ## Event
515
537
 
516
538
  ```js
517
539
  await sock.sendMessage(jid, {
518
540
  event: {
519
- name: 'Nama Acara 🌟',
520
- description: 'Deskripsi indah 🌸',
541
+ name: 'Nama Acara',
542
+ description: 'Deskripsi',
521
543
  startDate: new Date('2025-12-01T10:00:00'),
522
544
  endDate: new Date('2025-12-01T12:00:00'),
523
545
  location: {
524
546
  degreesLatitude: -6.2088,
525
547
  degreesLongitude: 106.8456,
526
- name: 'Monas, Jakarta 🌆'
548
+ name: 'Monas, Jakarta'
527
549
  },
528
550
  extraGuestsAllowed: true
529
551
  }
530
552
  })
531
- ```
532
553
 
533
- **📞 Event dengan scheduled call (audio/video):**
534
- ```js
554
+ // Event dengan scheduled call
535
555
  await sock.sendMessage(jid, {
536
556
  event: {
537
- name: 'Meeting Online 💻',
557
+ name: 'Meeting Online',
538
558
  startDate: new Date('2025-12-01T10:00:00'),
539
- call: 'audio', // 🎙️ 'audio' | 📹 'video'
559
+ call: 'audio', // 'audio' | 'video'
540
560
  isScheduleCall: true
541
561
  }
542
562
  })
@@ -544,43 +564,41 @@ await sock.sendMessage(jid, {
544
564
 
545
565
  ---
546
566
 
547
- ## 📸 Group Status / Group Story
567
+ ## Group Status / Group Story
548
568
 
549
569
  ```js
550
- // 💬 Teks
570
+ // Teks
551
571
  await sock.sendMessage(groupJid, {
552
- groupStatusMessage: { text: 'Status teks yang manis~ 🌸' }
572
+ groupStatusMessage: { text: 'Status teks' }
553
573
  })
554
574
 
555
- // 🖼️ Gambar
575
+ // Gambar
556
576
  await sock.sendMessage(groupJid, {
557
577
  groupStatusMessage: {
558
578
  image: { url: 'https://example.com/image.jpg' },
559
- caption: 'Keterangan 💖'
579
+ caption: 'Keterangan'
560
580
  }
561
581
  })
562
582
 
563
- // 🎥 Video
583
+ // Video
564
584
  await sock.sendMessage(groupJid, {
565
585
  groupStatusMessage: {
566
586
  video: { url: 'https://example.com/video.mp4' },
567
- caption: 'Keterangan 🌷'
587
+ caption: 'Keterangan'
568
588
  }
569
589
  })
570
590
  ```
571
591
 
572
592
  ---
573
593
 
574
- ## Flow Reply
575
-
576
- > 💫 Balas pesan interaktif native flow dengan anggun~
594
+ ## Flow Reply
577
595
 
578
596
  ```js
579
597
  await sock.sendMessage(jid, {
580
598
  flowReply: {
581
- name: 'quick_reply', // 🔘 nama button yang ditekan
599
+ name: 'quick_reply',
582
600
  paramsJson: '{"id":"btn1"}',
583
- text: 'Teks balasan 🌸',
601
+ text: 'Teks balasan',
584
602
  format: 1,
585
603
  version: 1
586
604
  }
@@ -589,58 +607,50 @@ await sock.sendMessage(jid, {
589
607
 
590
608
  ---
591
609
 
592
- ## 🔘 Button Reply
610
+ ## Button Reply
593
611
 
594
612
  ```js
595
- // 🗂️ Template button
613
+ // Template button
596
614
  await sock.sendMessage(jid, {
597
- buttonReply: {
598
- displayText: 'Opsi yang dipilih 💕',
599
- id: 'btn_id',
600
- index: 0
601
- },
615
+ buttonReply: { displayText: 'Opsi yang dipilih', id: 'btn_id', index: 0 },
602
616
  type: 'template'
603
617
  })
604
618
 
605
- // 🔵 Plain button
619
+ // Plain button
606
620
  await sock.sendMessage(jid, {
607
- buttonReply: {
608
- displayText: 'Opsi yang dipilih 🌸',
609
- id: 'btn_id'
610
- },
621
+ buttonReply: { displayText: 'Opsi yang dipilih', id: 'btn_id' },
611
622
  type: 'plain'
612
623
  })
613
624
  ```
614
625
 
615
626
  ---
616
627
 
617
- ## 📌 Keep In Chat
628
+ ## Keep In Chat
618
629
 
619
630
  ```js
620
- // 💾 Simpan
621
631
  await sock.sendMessage(jid, {
622
632
  keep: m.key,
623
- keepType: 1 // 1 = keep 💖, 2 = unkeep 🍃
633
+ keepType: 1 // 1 = keep, 2 = unkeep
624
634
  })
625
635
  ```
626
636
 
627
637
  ---
628
638
 
629
- ## 📞 Scheduled Call
639
+ ## Scheduled Call
630
640
 
631
641
  ```js
632
642
  await sock.sendMessage(jid, {
633
643
  call: {
634
644
  time: Date.now() + 3600000,
635
- type: 1, // 1 = voice 🎙️, 2 = video 📹
636
- title: 'Meeting 🌸'
645
+ type: 1, // 1 = voice, 2 = video
646
+ title: 'Meeting'
637
647
  }
638
648
  })
639
649
  ```
640
650
 
641
651
  ---
642
652
 
643
- ## 🔗 Group Invite
653
+ ## Group Invite
644
654
 
645
655
  ```js
646
656
  await sock.sendMessage(jid, {
@@ -648,54 +658,54 @@ await sock.sendMessage(jid, {
648
658
  jid: 'xxx@g.us',
649
659
  inviteCode: 'kode',
650
660
  inviteExpiration: Date.now() + 86400000,
651
- subject: 'Nama Grup 🌷',
652
- text: 'Bergabunglah bersama kami~ 💕'
661
+ subject: 'Nama Grup',
662
+ text: 'Bergabunglah bersama kami'
653
663
  }
654
664
  })
655
665
  ```
656
666
 
657
667
  ---
658
668
 
659
- ## 🛍️ Product
669
+ ## Product
660
670
 
661
671
  ```js
662
672
  await sock.sendMessage(jid, {
663
673
  product: {
664
674
  productImage: fs.readFileSync('produk.jpg'),
665
675
  productId: 'prod_123',
666
- title: 'Nama Produk 🌸',
667
- description: 'Deskripsi cantik 💖',
676
+ title: 'Nama Produk',
677
+ description: 'Deskripsi produk',
668
678
  currencyCode: 'IDR',
669
679
  priceAmount1000: 50000000,
670
680
  retailerId: 'sku_001',
671
681
  url: 'https://toko.example.com/produk'
672
682
  },
673
- businessOwnerJid: '628xxx@s.whatsapp.net' // 🌟 wajib diisi ya~
683
+ businessOwnerJid: '628xxx@s.whatsapp.net' // wajib diisi
674
684
  })
675
685
  ```
676
686
 
677
687
  ---
678
688
 
679
- ## 👁️ View Once
689
+ ## View Once
680
690
 
681
691
  ```js
682
692
  await sock.sendMessage(jid, {
683
693
  image: { url: 'https://example.com/image.jpg' },
684
- viewOnce: true // 🌸 sekali lihat, hilang bagai mimpi~
694
+ viewOnce: true
685
695
  })
686
696
  ```
687
697
 
688
698
  ---
689
699
 
690
- ## 👁️ View Once V2
700
+ ## View Once V2
691
701
 
692
702
  ```js
693
703
  await sock.sendMessage(jid, {
694
704
  image: { url: 'https://example.com/image.jpg' },
695
- viewOnceV2: true // 💫 wrap ke viewOnceMessageV2
705
+ viewOnceV2: true
696
706
  })
697
707
 
698
- // 🌟 viewOnceV2Extension
708
+ // viewOnceV2Extension
699
709
  await sock.sendMessage(jid, {
700
710
  image: { url: 'https://example.com/image.jpg' },
701
711
  viewOnceV2Extension: true
@@ -704,49 +714,41 @@ await sock.sendMessage(jid, {
704
714
 
705
715
  ---
706
716
 
707
- ## ⏱️ Ephemeral
708
-
709
- > 🍃 Wrap pesan ke dalam `ephemeralMessage` — pesan yang menghilang seperti embun pagi~
717
+ ## Ephemeral
710
718
 
711
719
  ```js
712
720
  await sock.sendMessage(jid, {
713
- text: 'Pesan ini ephemeral 🌸',
721
+ text: 'Pesan ini ephemeral',
714
722
  ephemeral: true
715
723
  })
716
724
  ```
717
725
 
718
726
  ---
719
727
 
720
- ## 🫣 Spoiler
721
-
722
- > 🎀 Wrap pesan ke dalam `spoilerMessage` — untuk kejutan yang manis~
728
+ ## Spoiler
723
729
 
724
730
  ```js
725
731
  await sock.sendMessage(jid, {
726
732
  image: { url: 'https://example.com/image.jpg' },
727
- caption: 'Spoiler! 🌷',
733
+ caption: 'Spoiler!',
728
734
  spoiler: true
729
735
  })
730
736
  ```
731
737
 
732
738
  ---
733
739
 
734
- ## 📢 Group Status Wrap
735
-
736
- > 💕 Wrap pesan biasa menjadi `groupStatusMessageV2`~
740
+ ## Group Status Wrap
737
741
 
738
742
  ```js
739
743
  await sock.sendMessage(jid, {
740
- text: 'Status di grup ini 🌸',
744
+ text: 'Status di grup ini',
741
745
  groupStatus: true
742
746
  })
743
747
  ```
744
748
 
745
749
  ---
746
750
 
747
- ## 🌀 Lottie Sticker
748
-
749
- > ✨ Wrap sticker ke dalam `lottieStickerMessage` — animasi yang memukau~
751
+ ## Lottie Sticker
750
752
 
751
753
  ```js
752
754
  await sock.sendMessage(jid, {
@@ -757,85 +759,95 @@ await sock.sendMessage(jid, {
757
759
 
758
760
  ---
759
761
 
760
- ## 🔲 Buttons
762
+ ## AI Icon
763
+
764
+ ```js
765
+ // Hanya untuk private chat (bukan grup)
766
+ await sock.sendMessage(jid, { text: 'Respons dari AI', ai: true })
767
+
768
+ await sock.sendMessage(jid, {
769
+ image: { url: 'https://example.com/image.jpg' },
770
+ caption: 'Dihasilkan oleh AI',
771
+ ai: true
772
+ })
773
+ ```
774
+
775
+ ---
761
776
 
762
- > 💖 Kirim pesan dengan tombol interaktif yang menggemaskan~
777
+ ## Secure Meta Service Label
763
778
 
764
779
  ```js
765
- // 💬 Dengan teks biasa
766
780
  await sock.sendMessage(jid, {
767
- text: 'Pilih salah satu ya sayang~ 🌸',
768
- footer: 'Footer pesan 🍃',
769
- buttons: [
770
- { id: 'btn1', text: 'Tombol 1 💕' },
771
- { id: 'btn2', text: 'Tombol 2 🌷' },
772
- { id: 'btn3', text: 'Tombol 3 🌺' }
773
- ]
781
+ text: 'Pesan layanan resmi',
782
+ secureMetaServiceLabel: true
774
783
  })
784
+ ```
775
785
 
776
- // 🖼️ Dengan gambar sebagai header
786
+ ---
787
+
788
+ ## Buttons
789
+
790
+ ```js
791
+ // Teks dengan tombol
777
792
  await sock.sendMessage(jid, {
778
- image: { url: 'https://example.com/image.jpg' },
779
- caption: 'Isi pesan 💖',
780
- footer: 'Footer 🌸',
793
+ text: 'Pilih salah satu',
794
+ footer: 'Footer pesan',
781
795
  buttons: [
782
- { id: 'btn1', text: 'Pilih A 🌷' },
783
- { id: 'btn2', text: 'Pilih B 🌺' }
796
+ { id: 'btn1', text: 'Tombol 1' },
797
+ { id: 'btn2', text: 'Tombol 2' },
798
+ { id: 'btn3', text: 'Tombol 3' }
784
799
  ]
785
800
  })
786
801
 
787
- // 🌊 Native flow button (single select dengan sections)
802
+ // Gambar sebagai header
788
803
  await sock.sendMessage(jid, {
789
- text: 'Pilih menu~ 🌸',
804
+ image: { url: 'https://example.com/image.jpg' },
805
+ caption: 'Isi pesan',
806
+ footer: 'Footer',
790
807
  buttons: [
791
- {
792
- text: 'Buka Menu 💕',
793
- sections: [
794
- {
795
- title: 'Kategori A 🌷',
796
- rows: [
797
- { id: 'row1', title: 'Item 1 🌸', description: 'Deskripsi manis' },
798
- { id: 'row2', title: 'Item 2 🌺' }
799
- ]
800
- }
801
- ]
802
- }
808
+ { id: 'btn1', text: 'Pilih A' },
809
+ { id: 'btn2', text: 'Pilih B' }
803
810
  ]
804
811
  })
805
812
 
806
- // Native flow button dengan name kustom
813
+ // Native flow button
807
814
  await sock.sendMessage(jid, {
808
- text: 'Pilih~ 💖',
809
- buttons: [
810
- { name: 'quick_reply', paramsJson: '{"id":"1"}', text: 'Quick Reply 🌸' }
811
- ]
815
+ text: 'Pilih menu',
816
+ buttons: [{
817
+ text: 'Buka Menu',
818
+ sections: [{
819
+ title: 'Kategori A',
820
+ rows: [
821
+ { id: 'row1', title: 'Item 1', description: 'Deskripsi' },
822
+ { id: 'row2', title: 'Item 2' }
823
+ ]
824
+ }]
825
+ }]
812
826
  })
813
827
  ```
814
828
 
815
829
  ---
816
830
 
817
- ## 📋 List Message
818
-
819
- > 🌷 Kirim pesan daftar pilihan yang teratur dan elegan~
831
+ ## List Message
820
832
 
821
833
  ```js
822
834
  await sock.sendMessage(jid, {
823
- text: 'Silakan pilih~ 🌸',
824
- title: 'Judul List 💕',
825
- buttonText: 'Buka Daftar 🌷',
826
- footer: 'Footer pesan 🍃',
835
+ text: 'Silakan pilih',
836
+ title: 'Judul List',
837
+ buttonText: 'Buka Daftar',
838
+ footer: 'Footer pesan',
827
839
  sections: [
828
840
  {
829
- title: 'Bagian 1 🌺',
841
+ title: 'Bagian 1',
830
842
  rows: [
831
- { id: 'row1', title: 'Pilihan A 💖', description: 'Deskripsi A yang manis' },
832
- { id: 'row2', title: 'Pilihan B 🌸', description: 'Deskripsi B yang lembut' }
843
+ { id: 'row1', title: 'Pilihan A', description: 'Deskripsi A' },
844
+ { id: 'row2', title: 'Pilihan B', description: 'Deskripsi B' }
833
845
  ]
834
846
  },
835
847
  {
836
- title: 'Bagian 2 🌼',
848
+ title: 'Bagian 2',
837
849
  rows: [
838
- { id: 'row3', title: 'Pilihan C 🌷' }
850
+ { id: 'row3', title: 'Pilihan C' }
839
851
  ]
840
852
  }
841
853
  ]
@@ -844,79 +856,75 @@ await sock.sendMessage(jid, {
844
856
 
845
857
  ---
846
858
 
847
- ## 🗂️ Template Buttons
848
-
849
- > 💌 Tombol template (quick reply, URL, call) — tampil di WhatsApp Web/Desktop & iOS~
859
+ ## Template Buttons
850
860
 
851
861
  ```js
852
- // 💬 Dengan teks
862
+ // Teks
853
863
  await sock.sendMessage(jid, {
854
- text: 'Pesan template 🌸',
855
- footer: 'Footer 🍃',
864
+ text: 'Pesan template',
865
+ footer: 'Footer',
856
866
  id: 'template-unik',
857
867
  templateButtons: [
858
- { id: 'btn1', text: 'Quick Reply 💕' },
859
- { url: 'https://example.com', text: 'Kunjungi Website 🌐' },
860
- { call: '+62812345678', text: 'Hubungi Kami 📞' }
868
+ { id: 'btn1', text: 'Quick Reply' },
869
+ { url: 'https://example.com', text: 'Kunjungi Website' },
870
+ { call: '+62812345678', text: 'Hubungi Kami' }
861
871
  ]
862
872
  })
863
873
 
864
- // 🖼️ Dengan gambar sebagai header
874
+ // Gambar sebagai header
865
875
  await sock.sendMessage(jid, {
866
876
  image: { url: 'https://example.com/img.jpg' },
867
- caption: 'Isi pesan 💖',
868
- title: 'Judul 🌸',
869
- footer: 'Footer 🌷',
877
+ caption: 'Isi pesan',
878
+ title: 'Judul',
879
+ footer: 'Footer',
870
880
  templateButtons: [
871
- { id: 'btn1', text: 'Klik Sini 💕' },
872
- { url: 'https://example.com', text: 'Buka Link 🌐' }
881
+ { id: 'btn1', text: 'Klik Sini' },
882
+ { url: 'https://example.com', text: 'Buka Link' }
873
883
  ]
874
884
  })
875
885
  ```
876
886
 
877
887
  ---
878
888
 
879
- ## 🌊 Native Flow
880
-
881
- > ✨ Pesan interaktif dengan native flow buttons yang indah — mendukung media header & audio footer~
889
+ ## Native Flow
882
890
 
883
891
  ```js
884
- // 💬 Teks dengan native flow buttons
892
+ // Teks dengan native flow buttons
885
893
  await sock.sendMessage(jid, {
886
- text: 'Pilih aksi~ 🌸',
887
- footer: 'Footer pesan 🍃',
894
+ text: 'Pilih aksi',
895
+ footer: 'Footer pesan',
888
896
  nativeFlow: [
889
- { name: 'quick_reply', paramsJson: '{"id":"1"}', text: 'Opsi 1 💕' },
890
- { name: 'quick_reply', paramsJson: '{"id":"2"}', text: 'Opsi 2 🌷' }
897
+ { name: 'quick_reply', paramsJson: '{"id":"1"}', text: 'Opsi 1' },
898
+ { name: 'quick_reply', paramsJson: '{"id":"2"}', text: 'Opsi 2' }
891
899
  ]
892
900
  })
893
901
 
894
- // 🖼️ Dengan gambar sebagai header
902
+ // Gambar sebagai header
895
903
  await sock.sendMessage(jid, {
896
904
  image: { url: 'https://example.com/img.jpg' },
897
- caption: 'Isi pesan 💖',
898
- title: 'Judul 🌸',
899
- subtitle: 'Subjudul 🌷',
900
- footer: 'Footer 🍃',
905
+ caption: 'Isi pesan',
906
+ title: 'Judul',
907
+ subtitle: 'Subjudul',
908
+ footer: 'Footer',
901
909
  nativeFlow: [
902
- { name: 'quick_reply', paramsJson: '{"id":"1"}', text: 'Tombol 1 💕' }
910
+ { name: 'quick_reply', paramsJson: '{"id":"1"}', text: 'Tombol 1' }
903
911
  ]
904
912
  })
905
913
 
906
- // 🎵 Dengan audio footer
914
+ // Dengan audio footer
907
915
  await sock.sendMessage(jid, {
908
- text: 'Pesan dengan audio footer 🎶',
916
+ text: 'Pesan dengan audio footer',
909
917
  audioFooter: fs.readFileSync('audio.ogg'),
910
918
  nativeFlow: [
911
- { name: 'quick_reply', paramsJson: '{"id":"1"}', text: 'OK 💖' }
919
+ { name: 'quick_reply', paramsJson: '{"id":"1"}', text: 'OK' }
912
920
  ]
913
921
  })
914
922
 
915
- // 🎀 Wrap sebagai templateMessage
923
+ // Wrap sebagai templateMessage
916
924
  await sock.sendMessage(jid, {
917
- text: 'Template interaktif 🌸',
925
+ text: 'Template interaktif',
918
926
  nativeFlow: [
919
- { name: 'quick_reply', paramsJson: '{"id":"1"}', text: 'Tombol 💕' }
927
+ { name: 'quick_reply', paramsJson: '{"id":"1"}', text: 'Tombol' }
920
928
  ],
921
929
  interactiveAsTemplate: true,
922
930
  id: 'template-id-unik'
@@ -925,30 +933,28 @@ await sock.sendMessage(jid, {
925
933
 
926
934
  ---
927
935
 
928
- ## 🎠 Carousel
929
-
930
- > 🌺 Pesan carousel dengan kartu-kartu yang cantik (image/video/product per kartu)~
936
+ ## Carousel
931
937
 
932
938
  ```js
933
939
  await sock.sendMessage(jid, {
934
- text: 'Carousel utama 🌸',
935
- footer: 'Footer utama 🍃',
940
+ text: 'Carousel utama',
941
+ footer: 'Footer utama',
936
942
  cards: [
937
943
  {
938
944
  image: { url: 'https://example.com/1.jpg' },
939
- title: 'Kartu 1 💕',
940
- caption: 'Deskripsi kartu 1 yang manis 🌷',
941
- footer: 'Footer kartu 1 🌸',
945
+ title: 'Kartu 1',
946
+ caption: 'Deskripsi kartu 1',
947
+ footer: 'Footer kartu 1',
942
948
  nativeFlow: [
943
- { name: 'quick_reply', paramsJson: '{"id":"c1"}', text: 'Pilih Ini 💖' }
949
+ { name: 'quick_reply', paramsJson: '{"id":"c1"}', text: 'Pilih Ini' }
944
950
  ]
945
951
  },
946
952
  {
947
953
  image: { url: 'https://example.com/2.jpg' },
948
- title: 'Kartu 2 🌺',
949
- caption: 'Deskripsi kartu 2 yang indah 🌼',
954
+ title: 'Kartu 2',
955
+ caption: 'Deskripsi kartu 2',
950
956
  nativeFlow: [
951
- { name: 'quick_reply', paramsJson: '{"id":"c2"}', text: 'Pilih Itu 🌸' }
957
+ { name: 'quick_reply', paramsJson: '{"id":"c2"}', text: 'Pilih Itu' }
952
958
  ]
953
959
  }
954
960
  ]
@@ -957,210 +963,503 @@ await sock.sendMessage(jid, {
957
963
 
958
964
  ---
959
965
 
960
- ## 🗨️ Status Mention
961
-
962
- > 💫 Mention seseorang di status/story dengan mengirim pesan ke array JID — otomatis mengirim `statusMentionMessage` atau `groupStatusMentionMessage` ke JID yang dituju~
966
+ ## Status Mention
963
967
 
964
968
  ```js
965
- // 💬 Status teks dengan mention ke user/group
969
+ // Kirim ke array JID untuk trigger status mention
966
970
  await sock.sendMessage(['628xxx@s.whatsapp.net', 'yyy@g.us'], {
967
- text: 'Hei kamu~ 🌸',
971
+ text: 'Hei kamu!',
968
972
  backgroundColor: '#ff6b9d'
969
973
  })
970
974
 
971
- // 🖼️ Status gambar dengan mention
975
+ // Gambar dengan mention
972
976
  await sock.sendMessage(['628xxx@s.whatsapp.net'], {
973
977
  image: { url: 'https://example.com/image.jpg' },
974
- caption: 'Buat kamu~ 💕'
978
+ caption: 'Untuk kamu'
975
979
  })
976
980
  ```
977
981
 
978
- > 🍀 Kirim ke array JID untuk trigger status mention. Untuk grup, otomatis pakai `groupStatusMentionMessage`~
982
+ > Untuk grup, otomatis pakai `groupStatusMentionMessage`.
979
983
 
980
984
  ---
981
985
 
982
- ## 🤖 AI Icon
986
+ ## Rich Message (AI)
987
+
988
+ > Rich message menggunakan format `AIRichResponseMessage` yang tampil seperti respons AI di WhatsApp. Semua tipe di bawah bisa dipakai secara flat (field langsung) atau dikombinasikan via `richResponse: [...]`.
989
+
990
+ ### addText
983
991
 
984
- > Tambahkan AI icon pada pesan di private chat hanya bisa digunakan untuk percakapan personal (bukan grup)~
992
+ Kirim teks markdown sebagai AI Rich Response. Mendukung hyperlink, citation, dan LaTeX inline.
985
993
 
986
994
  ```js
987
- // 💬 Teks dengan AI icon
988
995
  await sock.sendMessage(jid, {
989
- text: 'Halo! Aku asisten AI-mu~ 🌸',
990
- ai: true
996
+ contentText: 'Ini teks dari AI dengan *markdown* dan **bold**.',
997
+ headerText: 'Judul',
998
+ footerText: 'Footer',
999
+ disclaimerText: 'Generated by AI'
991
1000
  })
1001
+ ```
1002
+
1003
+ ---
992
1004
 
993
- // 🖼️ Gambar dengan AI icon
1005
+ ### addCode
1006
+
1007
+ Kirim blok kode dengan syntax highlighting.
1008
+
1009
+ ```js
994
1010
  await sock.sendMessage(jid, {
995
- image: { url: 'https://example.com/image.jpg' },
996
- caption: 'Dihasilkan oleh AI 💖',
997
- ai: true
1011
+ code: 'console.log("Hello World!")',
1012
+ language: 'javascript', // default: 'javascript'
1013
+ headerText: 'Contoh kode:',
1014
+ footerText: 'Semoga membantu',
1015
+ disclaimerText: 'Generated by AI'
998
1016
  })
999
1017
  ```
1000
1018
 
1001
- > 🌷 `ai: true` hanya berlaku di private chat (JID `@s.whatsapp.net` atau LID). Akan error jika dikirim ke grup~
1019
+ **Bahasa yang didukung:**
1020
+
1021
+ | Bahasa | Key |
1022
+ |--------|-----|
1023
+ | JavaScript | `javascript`, `js` |
1024
+ | TypeScript | `typescript`, `ts` |
1025
+ | Python | `python`, `py` |
1026
+ | Go | `go`, `golang` |
1027
+ | C++ | `cpp`, `c++` |
1028
+ | Rust | `rust`, `rs` |
1029
+ | Java | `java` |
1030
+ | PHP | `php` |
1031
+ | Ruby | `ruby`, `rb` |
1032
+ | Kotlin | `kotlin`, `kt` |
1033
+ | Swift | `swift` |
1034
+ | C | `c` |
1035
+ | SQL/MySQL/PostgreSQL | `sql`, `mysql`, `postgresql`, `sqlite` |
1036
+ | Bash/Shell | `bash`, `sh`, `shell` |
1037
+ | HTML | `html` |
1038
+ | CSS | `css` |
1039
+ | JSON | `json` |
1040
+ | YAML | `yaml`, `yml` |
1002
1041
 
1003
1042
  ---
1004
1043
 
1005
- ## 🏷️ Secure Meta Service Label
1044
+ ### addTable
1006
1045
 
1007
- > 🌿 Tambahkan label layanan bisnis pada pesan memunculkan atribut biz pada relay~
1046
+ Kirim tabel dari array 2D. Baris pertama otomatis menjadi header.
1008
1047
 
1009
1048
  ```js
1010
1049
  await sock.sendMessage(jid, {
1011
- text: 'Pesan layanan resmi kami~ 🌸',
1012
- secureMetaServiceLabel: true
1050
+ table: [
1051
+ ['Nama', 'Usia', 'Kota'], // baris pertama = header
1052
+ ['Hana', '20', 'Jakarta'],
1053
+ ['Risa', '22', 'Bandung'],
1054
+ ['Yuki', '21', 'Surabaya']
1055
+ ],
1056
+ title: 'Data Anggota',
1057
+ headerText: 'Berikut datanya',
1058
+ footerText: 'Data per Juni 2025'
1013
1059
  })
1014
1060
 
1015
- // 💌 Bisa dikombinasikan dengan pesan media
1061
+ // Tanpa baris header
1016
1062
  await sock.sendMessage(jid, {
1017
- image: { url: 'https://example.com/banner.jpg' },
1018
- caption: 'Promo spesial dari kami 💕',
1019
- secureMetaServiceLabel: true
1063
+ table: [
1064
+ ['Item A', 'Rp 10.000'],
1065
+ ['Item B', 'Rp 20.000']
1066
+ ],
1067
+ noHeading: true,
1068
+ title: 'Daftar Harga'
1020
1069
  })
1021
1070
  ```
1022
1071
 
1023
1072
  ---
1024
1073
 
1025
- ## 💻 Code Block
1074
+ ### addImage
1026
1075
 
1027
- > 🌟 Kirim pesan kode dengan syntax highlighting tampil sebagai AI Rich Response~
1076
+ Kirim satu atau beberapa gambar sebagai grid image di AI Rich Response.
1028
1077
 
1029
1078
  ```js
1079
+ // Satu gambar
1030
1080
  await sock.sendMessage(jid, {
1031
- code: 'console.log("Hello World!")',
1032
- language: 'javascript', // 🌸 default: 'javascript'
1033
- headerText: 'Contoh kode:',
1034
- footerText: 'Semoga membantu~ 💖',
1035
- disclaimerText: 'Generated by AI'
1081
+ image: 'https://example.com/photo.jpg',
1082
+ headerText: 'Gambar untuk kamu'
1083
+ })
1084
+
1085
+ // Beberapa gambar (grid)
1086
+ await sock.sendMessage(jid, {
1087
+ image: [
1088
+ 'https://example.com/photo1.jpg',
1089
+ 'https://example.com/photo2.jpg',
1090
+ 'https://example.com/photo3.jpg'
1091
+ ],
1092
+ headerText: 'Koleksi gambar',
1093
+ footerText: 'Semoga suka'
1036
1094
  })
1037
1095
  ```
1038
1096
 
1039
- > 💡 Bahasa yang didukung bergantung pada `LANGUAGE_KEYWORDS` termasuk javascript, python, dll~
1097
+ > `image` menerima string URL atau array string URL. Berbeda dengan `gridImage` (format verbose), `image` adalah shorthand yang lebih praktis.
1040
1098
 
1041
1099
  ---
1042
1100
 
1043
- ## 🔗 Links (Rich)
1101
+ ### addVideo
1044
1102
 
1045
- > ✨ Kirim teks dengan referensi link yang kaya (inline citation) — tampil sebagai AI Rich Response~
1103
+ Kirim satu atau beberapa video di AI Rich Response.
1046
1104
 
1047
1105
  ```js
1106
+ // Satu video
1048
1107
  await sock.sendMessage(jid, {
1049
- links: [
1108
+ video: 'https://example.com/video.mp4',
1109
+ headerText: 'Video untuk kamu'
1110
+ })
1111
+
1112
+ // Dengan durasi (format: 'url|durasi_detik')
1113
+ await sock.sendMessage(jid, {
1114
+ video: 'https://example.com/video.mp4|120',
1115
+ headerText: 'Video berdurasi 2 menit'
1116
+ })
1117
+
1118
+ // Beberapa video
1119
+ await sock.sendMessage(jid, {
1120
+ video: [
1121
+ 'https://example.com/video1.mp4|60',
1122
+ 'https://example.com/video2.mp4|90'
1123
+ ],
1124
+ headerText: 'Playlist video'
1125
+ })
1126
+ ```
1127
+
1128
+ > Format URL video: `'url'` atau `'url|durasi_detik'`. Durasi dalam satuan detik, default 0.
1129
+
1130
+ ---
1131
+
1132
+ ### addSource
1133
+
1134
+ Kirim daftar sumber referensi/link sebagai search result card.
1135
+
1136
+ ```js
1137
+ await sock.sendMessage(jid, {
1138
+ source: [
1050
1139
  {
1051
- text: 'Kunjungi dokumentasi',
1052
- title: 'Docs',
1053
- displayName: 'Baileys Docs',
1054
- url: 'https://example.com/docs',
1055
- sources: [
1056
- {
1057
- displayName: 'Source 1 💕',
1058
- subtitle: 'Sumber terpercaya',
1059
- url: 'https://example.com/source'
1060
- }
1061
- ]
1140
+ url: 'https://example.com/artikel',
1141
+ title: 'Judul Artikel',
1142
+ display_name: 'Example.com',
1143
+ subtitle: 'Sumber terpercaya',
1144
+ favicon: 'https://example.com/favicon.ico'
1145
+ },
1146
+ {
1147
+ url: 'https://docs.example.com/api',
1148
+ title: 'Dokumentasi API',
1149
+ display_name: 'Docs',
1150
+ subtitle: 'Referensi lengkap'
1062
1151
  }
1063
1152
  ],
1064
- headerText: 'Referensi~ 🌸',
1065
- footerText: 'Semoga berguna 🍃'
1153
+ headerText: 'Sumber referensi'
1066
1154
  })
1067
1155
  ```
1068
1156
 
1157
+ **Field tiap sumber:**
1158
+
1159
+ | Field | Tipe | Keterangan |
1160
+ |-------|------|------------|
1161
+ | `url` | string | URL tujuan (wajib) |
1162
+ | `title` | string | Judul sumber |
1163
+ | `display_name` | string | Nama tampilan |
1164
+ | `subtitle` | string | Subjudul/deskripsi singkat |
1165
+ | `favicon` | string | URL favicon (opsional) |
1166
+ | `source_type` | string | Default `'THIRD_PARTY'` |
1167
+
1069
1168
  ---
1070
1169
 
1071
- ## 📊 Table (Rich)
1170
+ ### addReels
1072
1171
 
1073
- > 🌷 Kirim tabel cantik tampil sebagai AI Rich Response~
1172
+ Kirim daftar reel/video carousel (horizontal scroll) seperti hasil rekomendasi konten.
1074
1173
 
1075
1174
  ```js
1076
1175
  await sock.sendMessage(jid, {
1077
- table: [
1078
- ['Nama 🌸', 'Usia 💕', 'Kota 🌆'], // baris pertama = header
1079
- ['Hana', '20', 'Jakarta'],
1080
- ['Risa', '22', 'Bandung'],
1081
- ['Yuki', '21', 'Surabaya']
1176
+ reels: [
1177
+ {
1178
+ username: 'creator1',
1179
+ videoUrl: 'https://example.com/reel1.mp4',
1180
+ thumbnailUrl: 'https://example.com/thumb1.jpg',
1181
+ profileIconUrl: 'https://example.com/avatar1.jpg',
1182
+ reels_title: 'Judul Reel 1',
1183
+ likes_count: 1200,
1184
+ view_count: 50000,
1185
+ shares_count: 300,
1186
+ reel_source: 'IG',
1187
+ is_verified: true
1188
+ },
1189
+ {
1190
+ username: 'creator2',
1191
+ videoUrl: 'https://example.com/reel2.mp4',
1192
+ thumbnailUrl: 'https://example.com/thumb2.jpg',
1193
+ profileIconUrl: 'https://example.com/avatar2.jpg',
1194
+ reels_title: 'Judul Reel 2',
1195
+ likes_count: 800,
1196
+ view_count: 20000,
1197
+ reel_source: 'TT' // TikTok
1198
+ }
1082
1199
  ],
1083
- title: 'Data Anggota 🌟',
1084
- headerText: 'Berikut datanya~ 💖',
1085
- footerText: 'Data per Juni 2025 🍃'
1200
+ headerText: 'Rekomendasi video'
1086
1201
  })
1202
+ ```
1203
+
1204
+ **Field tiap reel:**
1087
1205
 
1088
- // 🔒 Tanpa baris header
1206
+ | Field | Tipe | Keterangan |
1207
+ |-------|------|------------|
1208
+ | `username` / `title` | string | Nama kreator |
1209
+ | `videoUrl` / `url` | string | URL video |
1210
+ | `thumbnailUrl` / `thumbnail` | string | URL thumbnail |
1211
+ | `profileIconUrl` / `profile_url` | string | URL foto profil |
1212
+ | `reels_title` | string | Judul reel |
1213
+ | `likes_count` / `like` | number | Jumlah like |
1214
+ | `view_count` / `view` | number | Jumlah views |
1215
+ | `shares_count` / `share` | number | Jumlah share |
1216
+ | `reel_source` / `source` | string | `'IG'`, `'TT'`, dll |
1217
+ | `is_verified` / `verified` | boolean | Akun terverifikasi |
1218
+
1219
+ ---
1220
+
1221
+ ### addProduct
1222
+
1223
+ Kirim kartu produk (single atau horizontal scroll untuk banyak produk).
1224
+
1225
+ ```js
1226
+ // Satu produk (Single layout)
1089
1227
  await sock.sendMessage(jid, {
1090
- table: [
1091
- ['Item A', 'Rp 10.000'],
1092
- ['Item B', 'Rp 20.000']
1228
+ product: {
1229
+ title: 'Nama Produk',
1230
+ brand: 'Nama Brand',
1231
+ price: 'Rp 150.000',
1232
+ sale_price: 'Rp 120.000',
1233
+ product_url: 'https://toko.example.com/produk',
1234
+ image_url: 'https://example.com/produk.jpg',
1235
+ icon_url: 'https://example.com/icon.jpg'
1236
+ },
1237
+ headerText: 'Rekomendasi produk untukmu'
1238
+ })
1239
+
1240
+ // Beberapa produk (HScroll layout)
1241
+ await sock.sendMessage(jid, {
1242
+ product: [
1243
+ {
1244
+ title: 'Produk A',
1245
+ brand: 'Brand X',
1246
+ price: 'Rp 50.000',
1247
+ product_url: 'https://toko.example.com/a',
1248
+ image_url: 'https://example.com/a.jpg'
1249
+ },
1250
+ {
1251
+ title: 'Produk B',
1252
+ brand: 'Brand Y',
1253
+ price: 'Rp 75.000',
1254
+ sale_price: 'Rp 60.000',
1255
+ product_url: 'https://toko.example.com/b',
1256
+ image_url: 'https://example.com/b.jpg'
1257
+ }
1093
1258
  ],
1094
- noHeading: true,
1095
- title: 'Daftar Harga 🌺'
1259
+ headerText: 'Produk pilihan hari ini'
1260
+ })
1261
+ ```
1262
+
1263
+ **Field tiap produk:**
1264
+
1265
+ | Field | Tipe | Keterangan |
1266
+ |-------|------|------------|
1267
+ | `title` | string | Nama produk |
1268
+ | `brand` | string | Nama brand |
1269
+ | `price` | string | Harga normal (teks bebas, mis. `'Rp 50.000'`) |
1270
+ | `sale_price` / `salePrice` | string | Harga diskon |
1271
+ | `product_url` / `url` | string | Link produk |
1272
+ | `image_url` / `image` | string | URL gambar utama |
1273
+ | `icon_url` / `icon` | string | URL gambar tambahan |
1274
+
1275
+ > Kirim object tunggal → **Single layout**. Kirim array → **HScroll layout**.
1276
+
1277
+ ---
1278
+
1279
+ ### addPost
1280
+
1281
+ Kirim kartu post sosial media (Instagram, TikTok, dll) dalam horizontal scroll.
1282
+
1283
+ ```js
1284
+ // Satu post
1285
+ await sock.sendMessage(jid, {
1286
+ post: {
1287
+ title: 'Judul Post',
1288
+ subtitle: 'Subjudul',
1289
+ username: 'namauser',
1290
+ profile_picture_url: 'https://example.com/avatar.jpg',
1291
+ is_verified: true,
1292
+ thumbnail_url: 'https://example.com/thumb.jpg',
1293
+ post_caption: 'Caption post ini',
1294
+ likes_count: 5000,
1295
+ comments_count: 200,
1296
+ shares_count: 100,
1297
+ post_url: 'https://instagram.com/p/xxx',
1298
+ post_deeplink: 'instagram://post/xxx',
1299
+ source_app: 'INSTAGRAM',
1300
+ footer_label: 'Lihat di Instagram',
1301
+ orientation: 'LANDSCAPE', // 'LANDSCAPE' | 'PORTRAIT'
1302
+ post_type: 'VIDEO' // 'VIDEO' | 'IMAGE'
1303
+ },
1304
+ headerText: 'Post terpopuler'
1305
+ })
1306
+
1307
+ // Beberapa post (carousel horizontal)
1308
+ await sock.sendMessage(jid, {
1309
+ post: [
1310
+ {
1311
+ username: 'user1',
1312
+ thumbnail_url: 'https://example.com/thumb1.jpg',
1313
+ post_caption: 'Caption post pertama',
1314
+ likes_count: 3000,
1315
+ post_url: 'https://instagram.com/p/aaa',
1316
+ source_app: 'INSTAGRAM'
1317
+ },
1318
+ {
1319
+ username: 'user2',
1320
+ thumbnail_url: 'https://example.com/thumb2.jpg',
1321
+ post_caption: 'Caption post kedua',
1322
+ likes_count: 1500,
1323
+ post_url: 'https://tiktok.com/@user2/video/yyy',
1324
+ source_app: 'TIKTOK'
1325
+ }
1326
+ ],
1327
+ headerText: 'Post trending hari ini'
1328
+ })
1329
+ ```
1330
+
1331
+ **Field tiap post:**
1332
+
1333
+ | Field | Tipe | Keterangan |
1334
+ |-------|------|------------|
1335
+ | `title` | string | Judul post |
1336
+ | `subtitle` | string | Subjudul |
1337
+ | `username` | string | Nama pengguna |
1338
+ | `profile_picture_url` / `profile_url` | string | URL foto profil |
1339
+ | `is_verified` / `verified` | boolean | Akun terverifikasi |
1340
+ | `thumbnail_url` / `thumbnail` | string | URL thumbnail post |
1341
+ | `post_caption` / `caption` | string | Caption/teks post |
1342
+ | `likes_count` / `like` | number | Jumlah like |
1343
+ | `comments_count` / `comment` | number | Jumlah komentar |
1344
+ | `shares_count` / `share` | number | Jumlah share |
1345
+ | `post_url` / `url` | string | URL post |
1346
+ | `post_deeplink` / `deeplink` | string | Deeplink aplikasi |
1347
+ | `source_app` / `source` | string | `'INSTAGRAM'`, `'TIKTOK'`, dll |
1348
+ | `footer_label` / `footer` | string | Teks footer |
1349
+ | `footer_icon` / `icon` | string | URL ikon footer |
1350
+ | `orientation` | string | `'LANDSCAPE'` atau `'PORTRAIT'` |
1351
+ | `post_type` | string | `'VIDEO'` atau `'IMAGE'` |
1352
+
1353
+ ---
1354
+
1355
+ ### addTip
1356
+
1357
+ Kirim teks pendek sebagai metadata/tip (tampil lebih kecil dan subtle).
1358
+
1359
+ ```js
1360
+ await sock.sendMessage(jid, {
1361
+ tip: 'Informasi ini dibuat oleh AI berdasarkan data terbaru.',
1362
+ headerText: 'Ringkasan'
1363
+ })
1364
+
1365
+ // Dikombinasikan dengan tipe lain
1366
+ await sock.sendMessage(jid, {
1367
+ contentText: 'Berikut jawabannya...',
1368
+ tip: 'Jawaban mungkin tidak selalu akurat. Verifikasi mandiri disarankan.'
1369
+ })
1370
+ ```
1371
+
1372
+ ---
1373
+
1374
+ ### addSuggest
1375
+
1376
+ Kirim saran prompt follow-up sebagai pill buttons yang bisa langsung diklik user.
1377
+
1378
+ ```js
1379
+ // Satu saran
1380
+ await sock.sendMessage(jid, {
1381
+ contentText: 'Begitulah penjelasannya.',
1382
+ suggest: 'Jelaskan lebih detail'
1383
+ })
1384
+
1385
+ // Beberapa saran
1386
+ await sock.sendMessage(jid, {
1387
+ contentText: 'Apakah ada yang ingin kamu tanyakan?',
1388
+ suggest: [
1389
+ 'Contoh kodenya?',
1390
+ 'Apa perbedaannya?',
1391
+ 'Kapan sebaiknya digunakan?',
1392
+ 'Ada alternatif lain?'
1393
+ ]
1096
1394
  })
1097
1395
  ```
1098
1396
 
1397
+ > Saran tampil sebagai pill button di bawah pesan. Saat user mengetuk salah satu, teks saran tersebut akan terkirim sebagai pesan baru.
1398
+
1099
1399
  ---
1100
1400
 
1101
- ## 🖼️ Grid Image (Rich)
1401
+ ### Grid Image (Rich)
1402
+
1403
+ Kirim grid gambar dengan format verbose (object URL lengkap).
1102
1404
 
1103
- > 🌸 Kirim grid gambar — satu gambar utama dengan beberapa thumbnail, tampil sebagai AI Rich Response~
1405
+ > Untuk pemakaian praktis, gunakan shorthand [`image`](#addimage).
1104
1406
 
1105
1407
  ```js
1408
+ // Object URL lengkap (recommended untuk kontrol penuh)
1106
1409
  await sock.sendMessage(jid, {
1107
1410
  gridImage: {
1108
1411
  gridImageUrl: {
1109
- imagePreviewUrl: 'https://example.com/thumb.jpg',
1110
- imageHighResUrl: 'https://example.com/image.jpg',
1111
- sourceUrl: 'https://example.com'
1412
+ imagePreviewUrl: 'https://picsum.photos/id/10/300/300',
1413
+ imageHighResUrl: 'https://picsum.photos/id/10/1200/1200',
1414
+ sourceUrl: 'https://picsum.photos'
1112
1415
  },
1113
1416
  imageUrls: [
1114
1417
  {
1115
- imagePreviewUrl: 'https://example.com/t1.jpg',
1116
- imageHighResUrl: 'https://example.com/i1.jpg',
1117
- sourceUrl: 'https://example.com/1'
1118
- },
1119
- {
1120
- imagePreviewUrl: 'https://example.com/t2.jpg',
1121
- imageHighResUrl: 'https://example.com/i2.jpg',
1122
- sourceUrl: 'https://example.com/2'
1418
+ imagePreviewUrl: 'https://picsum.photos/id/11/300/300',
1419
+ imageHighResUrl: 'https://picsum.photos/id/11/1200/1200',
1420
+ sourceUrl: 'https://picsum.photos'
1123
1421
  }
1124
1422
  ]
1125
1423
  },
1126
- headerText: 'Hasil pencarian gambar 🌸',
1127
- footerText: 'Sumber: Internet 🌐'
1424
+ headerText: 'Hasil pencarian gambar'
1128
1425
  })
1129
- ```
1130
1426
 
1131
- > 💡 `imageUrls` adalah array gambar pendukung di bawah gambar utama~
1427
+ // String URL (shorthand)
1428
+ await sock.sendMessage(jid, {
1429
+ gridImage: {
1430
+ gridImageUrl: 'https://picsum.photos/id/10/300/300',
1431
+ imageUrls: ['https://picsum.photos/id/11/300/300']
1432
+ },
1433
+ headerText: 'Hasil pencarian gambar'
1434
+ })
1435
+ ```
1132
1436
 
1133
1437
  ---
1134
1438
 
1135
- ## 🖼️ Inline Image (Rich)
1439
+ ### Inline Image (Rich)
1136
1440
 
1137
- > ✨ Kirim gambar yang muncul inline di dalam teks — seperti ilustrasi di dalam respons AI~
1441
+ Kirim gambar yang muncul inline di dalam teks.
1138
1442
 
1139
1443
  ```js
1140
1444
  await sock.sendMessage(jid, {
1141
1445
  inlineImage: {
1142
- imageUrl: {
1143
- imagePreviewUrl: 'https://example.com/preview.jpg',
1144
- imageHighResUrl: 'https://example.com/hires.jpg',
1145
- sourceUrl: 'https://example.com'
1146
- },
1147
- imageText: 'Ilustrasi diagram arsitektur 💡',
1148
- alignment: 0, // 0 = leading, 1 = trailing, 2 = center
1149
- tapLinkUrl: 'https://example.com/detail'
1446
+ imageUrl: 'https://picsum.photos/id/237/300/300',
1447
+ imageText: 'Ilustrasi gambar',
1448
+ alignment: 2, // 0 = leading, 1 = trailing, 2 = center
1449
+ tapLinkUrl: 'https://picsum.photos'
1150
1450
  },
1151
- headerText: 'Berikut ilustrasinya~ 🌷',
1152
- footerText: 'Tap gambar untuk detail 🔍'
1451
+ headerText: 'Berikut ilustrasinya',
1452
+ footerText: 'Tap gambar untuk detail'
1153
1453
  })
1154
1454
  ```
1155
1455
 
1156
1456
  ---
1157
1457
 
1158
- ## 🎞️ Dynamic / GIF (Rich)
1458
+ ### Dynamic / GIF (Rich)
1159
1459
 
1160
- > 💫 Kirim animasi atau GIF sebagai bagian dari AI Rich Response~
1460
+ Kirim animasi atau GIF.
1161
1461
 
1162
1462
  ```js
1163
- // GIF animasi
1164
1463
  await sock.sendMessage(jid, {
1165
1464
  dynamic: {
1166
1465
  url: 'https://example.com/animation.gif',
@@ -1168,30 +1467,18 @@ await sock.sendMessage(jid, {
1168
1467
  version: 1,
1169
1468
  loopCount: 0 // 0 = loop selamanya
1170
1469
  },
1171
- headerText: 'Animasi untuk kamu 💕',
1172
- footerText: 'Cantik kan~ 🌸'
1173
- })
1174
-
1175
- // Gambar statis via dynamic
1176
- await sock.sendMessage(jid, {
1177
- dynamic: {
1178
- url: 'https://example.com/image.png',
1179
- type: 1, // IMAGE
1180
- version: 1,
1181
- loopCount: 1
1182
- },
1183
- headerText: 'Gambar ini untukmu 🎀'
1470
+ headerText: 'Animasi untuk kamu'
1184
1471
  })
1185
1472
  ```
1186
1473
 
1187
1474
  ---
1188
1475
 
1189
- ## 🗺️ Map (Rich)
1476
+ ### Map (Rich)
1190
1477
 
1191
- > 🌍 Kirim peta interaktif dengan annotation lokasi — tampil sebagai AI Rich Response~
1478
+ Kirim peta interaktif dengan anotasi lokasi.
1192
1479
 
1193
1480
  ```js
1194
- // Peta sederhana
1481
+ // Satu lokasi
1195
1482
  await sock.sendMessage(jid, {
1196
1483
  map: {
1197
1484
  centerLatitude: -6.2088,
@@ -1204,16 +1491,15 @@ await sock.sendMessage(jid, {
1204
1491
  number: 1,
1205
1492
  latitude: -6.2088,
1206
1493
  longitude: 106.8456,
1207
- title: 'Jakarta Pusat 🌆',
1494
+ title: 'Jakarta Pusat',
1208
1495
  body: 'Ibu kota Indonesia'
1209
1496
  }
1210
1497
  ]
1211
1498
  },
1212
- headerText: 'Lokasi yang kamu cari~ 🗺️',
1213
- footerText: 'Tap peta untuk navigasi 🧭'
1499
+ headerText: 'Lokasi yang kamu cari'
1214
1500
  })
1215
1501
 
1216
- // Peta multi-lokasi
1502
+ // Multi-lokasi
1217
1503
  await sock.sendMessage(jid, {
1218
1504
  map: {
1219
1505
  centerLatitude: -7.2575,
@@ -1222,44 +1508,36 @@ await sock.sendMessage(jid, {
1222
1508
  longitudeDelta: 0.1,
1223
1509
  showInfoList: true,
1224
1510
  annotations: [
1225
- { number: 1, latitude: -7.2575, longitude: 112.7521, title: 'Surabaya 🏙️', body: 'Kota Pahlawan' },
1226
- { number: 2, latitude: -7.9797, longitude: 112.6304, title: 'Malang 🌿', body: 'Kota Bunga' }
1511
+ { number: 1, latitude: -7.2575, longitude: 112.7521, title: 'Surabaya', body: 'Kota Pahlawan' },
1512
+ { number: 2, latitude: -7.9797, longitude: 112.6304, title: 'Malang', body: 'Kota Bunga' }
1227
1513
  ]
1228
1514
  },
1229
- headerText: 'Kota-kota di Jawa Timur~ 🌺'
1515
+ headerText: 'Kota-kota di Jawa Timur'
1230
1516
  })
1231
1517
  ```
1232
1518
 
1233
1519
  ---
1234
1520
 
1235
- ## 🧮 LaTeX (Rich)
1521
+ ### LaTeX (Rich)
1236
1522
 
1237
- > ✏️ Kirim rumus matematika dalam format LaTeX — tampil dengan render formula yang indah~
1523
+ Kirim rumus matematika dalam format LaTeX.
1238
1524
 
1239
- > ⚠️ **Catatan penting:**
1240
- > - `url` di setiap expression **wajib ada** agar WA client bisa menampilkan gambar LaTeX. Jika tidak diisi, library akan **auto-generate** URL dari [latex.codecogs.com](https://latex.codecogs.com).
1241
- > - Gunakan `latex: {...}` langsung (flat) — **bukan** dibungkus dalam `richResponse: [{ latex: {...} }]`.
1242
- > - `headerText`, `footerText`, `disclaimerText` tetap bisa dipakai bersama `latex`.
1525
+ > `url` di setiap expression akan **otomatis di-generate** dari [latex.codecogs.com](https://latex.codecogs.com) jika tidak diisi.
1243
1526
 
1244
1527
  ```js
1245
- // Rumus sederhana — url auto-generate jika tidak diisi
1528
+ // Satu rumus
1246
1529
  await sock.sendMessage(jid, {
1247
1530
  latex: {
1248
1531
  text: 'Berikut rumus yang kamu minta:',
1249
1532
  expressions: [
1250
- {
1251
- expression: 'E = mc^2',
1252
- // url auto-generate dari codecogs kalau tidak diisi~
1253
- width: 120,
1254
- height: 40
1255
- }
1533
+ { expression: 'E = mc^2', width: 120, height: 40 }
1256
1534
  ]
1257
1535
  },
1258
- headerText: 'Rumus Einstein~ 🌟',
1259
- footerText: 'E = energi, m = massa, c = kecepatan cahaya 💡'
1536
+ headerText: 'Rumus Einstein',
1537
+ footerText: 'E = energi, m = massa, c = kecepatan cahaya'
1260
1538
  })
1261
1539
 
1262
- // Multiple expressions
1540
+ // Beberapa rumus
1263
1541
  await sock.sendMessage(jid, {
1264
1542
  latex: {
1265
1543
  text: 'Rumus-rumus fisika dasar:',
@@ -1269,181 +1547,160 @@ await sock.sendMessage(jid, {
1269
1547
  { expression: 's = ut + \\frac{1}{2}at^2', width: 160, height: 50 }
1270
1548
  ]
1271
1549
  },
1272
- headerText: 'Hukum Newton 🍎',
1273
- disclaimerText: 'Fisika dasar kelas 10~'
1274
- })
1275
-
1276
- // ✅ Dengan url custom (jika kamu punya server render sendiri)
1277
- await sock.sendMessage(jid, {
1278
- latex: {
1279
- text: 'Energi massa Einstein:',
1280
- expressions: [
1281
- {
1282
- expression: 'E = mc^2',
1283
- url: 'https://latex.codecogs.com/png.image?\dpi{150}\bg{white}E%20%3D%20mc%5E2',
1284
- width: 120,
1285
- height: 40
1286
- }
1287
- ]
1288
- },
1289
- headerText: 'Fisika Modern ⚛️'
1550
+ headerText: 'Hukum Newton',
1551
+ disclaimerText: 'Fisika dasar kelas 10'
1290
1552
  })
1291
1553
  ```
1292
1554
 
1293
- > 💡 `expression` menggunakan sintaks LaTeX standar. `url` akan **otomatis di-generate** dari codecogs jika tidak diisi — jadi kamu tidak perlu khawatir soal ini~
1294
-
1295
- > ❌ **Jangan pakai cara ini** (akan kosong/error):
1296
- > ```js
1297
- > // SALAH — latex tidak boleh dibungkus richResponse array untuk flat usage
1298
- > await sock.sendMessage(jid, {
1299
- > richResponse: [{ latex: { text: '...', expressions: [...] } }],
1300
- > headerText: 'Judul' // ← headerText diabaikan di mode array lama
1301
- > })
1302
- > ```
1303
-
1304
1555
  ---
1305
1556
 
1306
- ## 🎠 Content Items (Rich)
1557
+ ### Content Items (Rich)
1558
+
1559
+ Kirim carousel konten (reel/video) dengan format verbose.
1307
1560
 
1308
- > 🎬 Kirim daftar konten berupa reel/video carousel — seperti hasil rekomendasi konten AI~
1561
+ > Untuk pemakaian praktis, gunakan shorthand [`reels`](#addreels).
1309
1562
 
1310
1563
  ```js
1311
- // Carousel reel
1312
1564
  await sock.sendMessage(jid, {
1313
1565
  contentItems: {
1314
- contentType: 1, // 0 = DEFAULT, 1 = CAROUSEL
1566
+ contentType: 1, // 0 = DEFAULT, 1 = CAROUSEL
1315
1567
  items: [
1316
1568
  {
1317
1569
  kind: 'reel',
1318
- title: 'Tutorial Coding JavaScript 🌸',
1570
+ title: 'Tutorial Coding JavaScript',
1319
1571
  profileIconUrl: 'https://example.com/avatar1.jpg',
1320
1572
  thumbnailUrl: 'https://example.com/thumb1.jpg',
1321
1573
  videoUrl: 'https://example.com/video1.mp4'
1322
1574
  },
1323
1575
  {
1324
1576
  kind: 'reel',
1325
- title: 'Belajar React Hooks 💕',
1577
+ title: 'Belajar React Hooks',
1326
1578
  profileIconUrl: 'https://example.com/avatar2.jpg',
1327
1579
  thumbnailUrl: 'https://example.com/thumb2.jpg',
1328
1580
  videoUrl: 'https://example.com/video2.mp4'
1329
- },
1330
- {
1331
- kind: 'reel',
1332
- title: 'Node.js untuk Pemula 🌿',
1333
- profileIconUrl: 'https://example.com/avatar3.jpg',
1334
- thumbnailUrl: 'https://example.com/thumb3.jpg',
1335
- videoUrl: 'https://example.com/video3.mp4'
1336
1581
  }
1337
1582
  ]
1338
1583
  },
1339
- headerText: 'Rekomendasi video untukmu~ 🎬',
1340
- footerText: 'Selamat belajar! 💖'
1584
+ headerText: 'Rekomendasi video'
1341
1585
  })
1342
1586
  ```
1343
1587
 
1344
1588
  ---
1345
1589
 
1590
+ ### Links (Rich)
1591
+
1592
+ Kirim teks dengan inline citation/reference link.
1593
+
1594
+ ```js
1595
+ await sock.sendMessage(jid, {
1596
+ links: [
1597
+ {
1598
+ text: 'Kunjungi dokumentasi',
1599
+ title: 'Docs',
1600
+ displayName: 'Baileys Docs',
1601
+ url: 'https://example.com/docs',
1602
+ sources: [
1603
+ {
1604
+ displayName: 'Source 1',
1605
+ subtitle: 'Sumber terpercaya',
1606
+ url: 'https://example.com/source'
1607
+ }
1608
+ ]
1609
+ }
1610
+ ],
1611
+ headerText: 'Referensi',
1612
+ footerText: 'Semoga berguna'
1613
+ })
1614
+ ```
1615
+
1616
+ ---
1346
1617
 
1347
- ## 🌈 Rich Response (Gabungan)
1618
+ ### Rich Response (Gabungan)
1348
1619
 
1349
- > 💞 Kirim gabungan teks, kode, dan tabel dalam satu pesan AI Rich Response~
1620
+ Kirim kombinasi berbagai tipe Rich Message dalam satu pesan menggunakan mode array.
1350
1621
 
1351
1622
  ```js
1623
+ // Kombinasi teks + kode + tabel
1352
1624
  await sock.sendMessage(jid, {
1353
1625
  richResponse: [
1354
- { text: 'Penjelasan singkat~ 🌸' },
1626
+ { text: 'Penjelasan singkat:' },
1627
+ { code: 'const x = 1 + 1', language: 'javascript' },
1355
1628
  {
1356
- code: 'const x = 1 + 1',
1357
- language: 'javascript'
1629
+ table: [['Kolom A', 'Kolom B'], ['Nilai 1', 'Nilai 2']],
1630
+ title: 'Hasil'
1358
1631
  },
1632
+ { text: 'Semoga membantu ya!' }
1633
+ ],
1634
+ disclaimerText: 'Generated by AI'
1635
+ })
1636
+
1637
+ // Kombinasi dengan semua tipe baru
1638
+ await sock.sendMessage(jid, {
1639
+ richResponse: [
1640
+ { text: 'Berikut hasilnya:' },
1641
+ { image: ['https://example.com/img1.jpg', 'https://example.com/img2.jpg'] },
1642
+ { source: [{ url: 'https://example.com', title: 'Sumber Data' }] },
1643
+ { code: 'print("Hello")', language: 'python' },
1359
1644
  {
1360
- table: [['Kolom A', 'Kolom B'], ['Nilai 1', 'Nilai 2']],
1361
- title: 'Hasil 🌷'
1645
+ product: [
1646
+ { title: 'Produk A', price: 'Rp 50.000', image_url: 'https://example.com/a.jpg', product_url: 'https://example.com/a' },
1647
+ { title: 'Produk B', price: 'Rp 75.000', image_url: 'https://example.com/b.jpg', product_url: 'https://example.com/b' }
1648
+ ]
1649
+ },
1650
+ {
1651
+ post: [
1652
+ { username: 'user1', thumbnail_url: 'https://example.com/t1.jpg', post_url: 'https://ig.com/p/aaa', source_app: 'INSTAGRAM', likes_count: 1000 }
1653
+ ]
1362
1654
  },
1363
- { text: 'Semoga membantu ya~ 💕' }
1655
+ { tip: 'Informasi ini dihasilkan secara otomatis.' },
1656
+ { suggest: ['Tanya lebih lanjut', 'Lihat contoh lain', 'Mulai dari awal'] }
1364
1657
  ],
1365
- disclaimerText: 'Generated by AI 🤖'
1658
+ disclaimerText: 'Powered by AI'
1366
1659
  })
1367
1660
  ```
1368
1661
 
1369
1662
  ---
1370
1663
 
1371
- ---
1372
-
1373
- ---
1374
-
1375
- ## 📥 Terima & Decode Rich Message
1376
-
1377
- > 🔍 Parse pesan rich yang masuk (dari bot lain atau diri sendiri) menjadi objek yang mudah dipakai~
1664
+ ## Terima & Decode Rich Message
1378
1665
 
1379
1666
  ```js
1380
1667
  const { normalizeMessageContent, parseRichMessage } = require('@nuiisweety/baileys')
1381
1668
 
1382
1669
  sock.ev.on('messages.upsert', async ({ messages }) => {
1383
1670
  for (const msg of messages) {
1384
- // unwrap botForwardedMessage -> dapat richResponseMessage di dalamnya
1385
1671
  const inner = normalizeMessageContent(msg.message)
1386
1672
  const parsed = parseRichMessage(inner?.richResponseMessage)
1387
1673
 
1388
1674
  if (!parsed) continue
1389
1675
 
1390
- console.log('Rich message diterima! 🌸')
1391
- console.log('Total bagian:', parsed.submessages.length)
1392
-
1393
1676
  for (const sub of parsed.submessages) {
1394
1677
  switch (sub.type) {
1395
1678
  case 'text':
1396
- console.log('📝 Teks:', sub.text)
1679
+ console.log('Teks:', sub.text)
1397
1680
  break
1398
-
1399
1681
  case 'code':
1400
- console.log('💻 Kode (' + sub.language + '):')
1401
- console.log(sub.raw) // ← source code mentah tanpa highlight
1682
+ console.log('Kode (' + sub.language + '):', sub.raw)
1402
1683
  break
1403
-
1404
1684
  case 'table':
1405
- console.log('📊 Tabel:', sub.title)
1406
- for (const row of sub.rows) {
1407
- console.log(row.isHeading ? '[Header]' : '[Row]', row.items)
1408
- }
1685
+ console.log('Tabel:', sub.title, sub.rows)
1409
1686
  break
1410
-
1411
1687
  case 'gridImage':
1412
- console.log('🖼️ Grid Image:', sub.gridImageUrl)
1413
- console.log('Thumbnails:', sub.imageUrls.length)
1688
+ console.log('Grid Image:', sub.gridImageUrl, sub.imageUrls)
1414
1689
  break
1415
-
1416
1690
  case 'inlineImage':
1417
- console.log('🖼️ Inline Image:', sub.imageUrl)
1418
- console.log('Teks:', sub.imageText)
1691
+ console.log('Inline Image:', sub.imageUrl, sub.imageText)
1419
1692
  break
1420
-
1421
1693
  case 'dynamic':
1422
- console.log('🎞️ Dynamic (GIF/Image):', sub.url)
1423
- console.log('Type:', sub.dynamicType === 2 ? 'GIF' : 'Image')
1694
+ console.log('Dynamic:', sub.url, sub.dynamicType === 2 ? 'GIF' : 'Image')
1424
1695
  break
1425
-
1426
1696
  case 'map':
1427
- console.log('🗺️ Map:', sub.centerLatitude, sub.centerLongitude)
1428
- for (const ann of sub.annotations) {
1429
- console.log(' -', ann.title, ':', ann.body)
1430
- }
1697
+ console.log('Map:', sub.centerLatitude, sub.centerLongitude)
1431
1698
  break
1432
-
1433
1699
  case 'latex':
1434
- console.log('🧮 LaTeX:', sub.text)
1435
- for (const expr of sub.expressions) {
1436
- console.log(' -', expr.expression)
1437
- }
1700
+ console.log('LaTeX:', sub.text, sub.expressions)
1438
1701
  break
1439
-
1440
1702
  case 'contentItems':
1441
- console.log('🎠 Content Items (' + sub.contentType + '):')
1442
- for (const item of sub.items) {
1443
- if (item.kind === 'reel') {
1444
- console.log(' -', item.title, '→', item.videoUrl)
1445
- }
1446
- }
1703
+ console.log('Content Items:', sub.contentType, sub.items)
1447
1704
  break
1448
1705
  }
1449
1706
  }
@@ -1451,64 +1708,32 @@ sock.ev.on('messages.upsert', async ({ messages }) => {
1451
1708
  })
1452
1709
  ```
1453
1710
 
1454
- > 💡 `parseRichMessage` bisa terima `null` atau `undefined` dengan aman — return `null` kalau tidak ada rich message~
1711
+ > `parseRichMessage` menerima `null` atau `undefined` dengan aman — return `null` jika tidak ada rich message.
1455
1712
 
1456
1713
  ---
1457
1714
 
1458
- ## 📋 Bahasa yang Didukung
1459
-
1460
- > 🌸 Daftar lengkap bahasa pemrograman yang memiliki keyword highlighting untuk Code Block~
1461
-
1462
- | Bahasa | Key yang valid |
1463
- |--------|----------------|
1464
- | JavaScript | `javascript`, `js` |
1465
- | TypeScript | `typescript`, `ts` |
1466
- | Python | `python`, `py` |
1467
- | Go | `go`, `golang` |
1468
- | C++ | `cpp`, `c++` |
1469
- | Rust | `rust`, `rs` |
1470
- | Java | `java` |
1471
- | PHP | `php` |
1472
- | Ruby | `ruby`, `rb` |
1473
- | Kotlin | `kotlin`, `kt` |
1474
- | Swift | `swift` |
1475
- | C | `c` |
1476
- | SQL / MySQL / PostgreSQL | `sql`, `mysql`, `postgresql`, `sqlite` |
1477
- | Bash / Shell | `bash`, `sh`, `shell` |
1478
- | HTML | `html` |
1479
- | CSS | `css` |
1480
- | JSON | `json` |
1481
- | YAML | `yaml`, `yml` |
1482
-
1483
- > 💡 Bahasa lain yang tidak ada di daftar akan tetap dikirim sebagai code block, hanya saja tanpa syntax highlighting~
1484
-
1485
-
1486
- ## 📩 List Reply
1487
-
1488
- > 🌷 Simulasi balasan dari list message (ketika user memilih item dari daftar)~
1715
+ ## List Reply
1489
1716
 
1490
1717
  ```js
1491
1718
  await sock.sendMessage(jid, {
1492
1719
  listReply: {
1493
- title: 'Pilihan Saya 💕',
1720
+ title: 'Pilihan Saya',
1494
1721
  description: 'Deskripsi pilihan',
1495
- id: 'row1' // 🗝️ selectedRowId dari baris yang dipilih
1722
+ id: 'row1' // selectedRowId dari baris yang dipilih
1496
1723
  }
1497
1724
  })
1498
1725
  ```
1499
1726
 
1500
1727
  ---
1501
1728
 
1502
- ## 🎴 Sticker Pack
1503
-
1504
- > ✨ Kirim paket sticker kustom — membutuhkan cover dan minimal 1 sticker~
1729
+ ## Sticker Pack
1505
1730
 
1506
1731
  ```js
1507
1732
  await sock.sendMessage(jid, {
1508
- cover: fs.readFileSync('cover.webp'), // 🖼️ wajib ada
1509
- name: 'Pack Manis 🌸',
1510
- publisher: 'NuiiS4TORU 💖',
1511
- description: 'Sticker pack cantik~',
1733
+ cover: fs.readFileSync('cover.webp'), // wajib
1734
+ name: 'Pack Manis',
1735
+ publisher: 'NuiiS4TORU',
1736
+ description: 'Sticker pack cantik',
1512
1737
  stickers: [
1513
1738
  {
1514
1739
  data: fs.readFileSync('sticker1.webp'),
@@ -1519,106 +1744,80 @@ await sock.sendMessage(jid, {
1519
1744
  data: { url: 'https://example.com/sticker2.webp' },
1520
1745
  emojis: ['🌷']
1521
1746
  }
1522
- // 🌺 maksimal 60 sticker ya~
1747
+ // maksimal 60 sticker
1523
1748
  ]
1524
1749
  })
1525
1750
  ```
1526
1751
 
1527
- > 🍀 Butuh library `sharp` atau `@napi-rs/image` untuk konversi WebP. Setiap sticker maks 1MB~
1528
-
1529
1752
  ---
1530
1753
 
1531
- ## 📢 External Ad Reply
1532
-
1533
- > 💌 Tambahkan tampilan iklan eksternal sebagai context info pada pesan~
1754
+ ## External Ad Reply
1534
1755
 
1535
1756
  ```js
1536
- // 💬 Teks dengan external ad reply
1537
1757
  await sock.sendMessage(jid, {
1538
- text: 'Cek produk ini~ 🌸',
1758
+ text: 'Cek produk ini',
1539
1759
  externalAdReply: {
1540
- title: 'Judul Iklan 💕',
1541
- body: 'Deskripsi iklan yang menarik 🌷',
1542
- thumbnail: fs.readFileSync('thumbnail.jpg'), // 🖼️ harus Buffer
1760
+ title: 'Judul Iklan',
1761
+ body: 'Deskripsi iklan',
1762
+ thumbnail: fs.readFileSync('thumbnail.jpg'), // harus Buffer
1543
1763
  url: 'https://example.com/produk',
1544
- mediaType: 1, // 1 = image 🖼️
1764
+ mediaType: 1, // 1 = image
1545
1765
  largeThumbnail: false
1546
1766
  }
1547
1767
  })
1548
-
1549
- // 🖼️ Gambar dengan external ad reply
1550
- await sock.sendMessage(jid, {
1551
- image: { url: 'https://example.com/banner.jpg' },
1552
- caption: 'Penawaran spesial 💖',
1553
- externalAdReply: {
1554
- title: 'Promo Hari Ini 🌸',
1555
- url: 'https://example.com/promo',
1556
- thumbnail: fs.readFileSync('thumb.jpg'),
1557
- mediaType: 1
1558
- }
1559
- })
1560
1768
  ```
1561
1769
 
1562
1770
  ---
1563
1771
 
1564
- ## 💸 Request Payment
1565
-
1566
- > 🌷 Minta pembayaran dari seseorang — hanya untuk chat privat~
1772
+ ## Request Payment
1567
1773
 
1568
1774
  ```js
1569
- // 💬 Dengan teks sebagai note
1570
1775
  await sock.sendMessage(jid, {
1571
- text: 'Tolong transfer ya sayang~ 🌸',
1776
+ text: 'Tolong transfer ya',
1572
1777
  requestPaymentFrom: '628xxx@s.whatsapp.net',
1573
- amount1000: 50000000, // 💰 Rp 50.000 (dalam unit 1/1000)
1778
+ amount1000: 50000000, // Rp 50.000 (unit 1/1000)
1574
1779
  currencyCodeIso4217: 'IDR',
1575
- expiryTimestamp: Date.now() + 86400000 // kadaluarsa 1 hari
1780
+ expiryTimestamp: Date.now() + 86400000 // kadaluarsa 1 hari
1576
1781
  })
1577
1782
  ```
1578
1783
 
1579
- > 🍀 Note message harus berupa `extendedTextMessage` (teks) atau `stickerMessage`~
1580
-
1581
1784
  ---
1582
1785
 
1583
- ## 🧾 Invoice
1584
-
1585
- > ✨ Kirim invoice dengan attachment gambar atau dokumen PDF~
1786
+ ## Invoice
1586
1787
 
1587
1788
  ```js
1588
- // 🖼️ Invoice dengan gambar
1789
+ // Dengan gambar
1589
1790
  await sock.sendMessage(jid, {
1590
1791
  image: fs.readFileSync('invoice.jpg'),
1591
- invoiceNote: 'Invoice pembelian 🌸\nTotal: Rp 150.000 💕'
1792
+ invoiceNote: 'Invoice pembelian\nTotal: Rp 150.000'
1592
1793
  })
1593
1794
 
1594
- // 📄 Invoice dengan PDF
1795
+ // Dengan PDF
1595
1796
  await sock.sendMessage(jid, {
1596
1797
  document: fs.readFileSync('invoice.pdf'),
1597
1798
  mimetype: 'application/pdf',
1598
1799
  fileName: 'invoice.pdf',
1599
- invoiceNote: 'Terima kasih atas pesananmu~ 🌷'
1800
+ invoiceNote: 'Terima kasih atas pesananmu'
1600
1801
  })
1601
1802
  ```
1602
1803
 
1603
1804
  ---
1604
1805
 
1605
- ## 🛒 Order
1606
-
1607
- > 🌟 Kirim detail pesanan (order message) — untuk fitur belanja WhatsApp~
1806
+ ## Order
1608
1807
 
1609
1808
  ```js
1610
1809
  await sock.sendMessage(jid, {
1611
1810
  order: {
1612
1811
  orderId: 'order_001',
1613
- thumbnail: fs.readFileSync('produk.jpg'), // 🖼️ wajib ada
1812
+ thumbnail: fs.readFileSync('produk.jpg'), // wajib
1614
1813
  itemCount: 3,
1615
- status: 'PAYMENT_PENDING', // 💰 status pesanan
1814
+ status: 'PAYMENT_PENDING',
1616
1815
  surface: 'CATALOG',
1617
- message: 'Pesanan kamu sedang diproses ya~ 🌸',
1618
- orderTitle: 'Pesanan #001 💕',
1816
+ message: 'Pesanan kamu sedang diproses',
1817
+ orderTitle: 'Pesanan #001',
1619
1818
  sellerJid: '628xxx@s.whatsapp.net',
1620
1819
  token: 'token_unik',
1621
- totalAmount1000: 150000000, // 💸 Rp 150.000
1820
+ totalAmount1000: 150000000, // Rp 150.000
1622
1821
  totalCurrencyCode: 'IDR'
1623
1822
  }
1624
1823
  })
@@ -1626,46 +1825,40 @@ await sock.sendMessage(jid, {
1626
1825
 
1627
1826
  ---
1628
1827
 
1629
- ## Disappearing Messages
1630
-
1631
- > 🍃 Aktifkan atau nonaktifkan pesan menghilang di obrolan grup~
1828
+ ## Disappearing Messages
1632
1829
 
1633
1830
  ```js
1634
- // Aktifkan (86400 detik = 24 jam default)
1831
+ // Aktifkan (86400 detik = 24 jam default)
1635
1832
  await sock.sendMessage(groupJid, { disappearingMessagesInChat: true })
1636
1833
 
1637
- // Nonaktifkan
1834
+ // Nonaktifkan
1638
1835
  await sock.sendMessage(groupJid, { disappearingMessagesInChat: false })
1639
1836
 
1640
- // ⏱️ Durasi kustom (dalam detik)
1837
+ // Durasi kustom (detik)
1641
1838
  await sock.sendMessage(groupJid, { disappearingMessagesInChat: 604800 }) // 7 hari
1642
1839
  ```
1643
1840
 
1644
- > 🌷 Hanya berfungsi di grup (`@g.us`). Nilai `true` menggunakan `WA_DEFAULT_EPHEMERAL` (86400 detik)~
1841
+ > Hanya berfungsi di grup (`@g.us`).
1645
1842
 
1646
1843
  ---
1647
1844
 
1648
- ## 📦 Raw Message
1649
-
1650
- > ⚡ Kirim pesan dalam bentuk raw WAProto — untuk kontrol penuh struktur pesan~
1845
+ ## Raw Message
1651
1846
 
1652
1847
  ```js
1653
- // 🌸 Properti 'raw' akan di-bypass langsung tanpa transformasi apapun
1654
1848
  await sock.sendMessage(jid, {
1655
1849
  raw: true,
1656
1850
  extendedTextMessage: {
1657
- text: 'Pesan raw langsung ke proto~ 💕'
1851
+ text: 'Pesan raw langsung ke proto'
1658
1852
  }
1659
1853
  })
1660
1854
  ```
1661
1855
 
1662
- > 💡 Ketika `raw: true` ada, semua properti lain diteruskan langsung sebagai WAProto message tanpa pemrosesan tambahan~
1856
+ > Ketika `raw: true` ada, semua properti lain diteruskan langsung sebagai WAProto message tanpa pemrosesan tambahan.
1663
1857
 
1664
1858
  ---
1665
1859
 
1666
1860
  <div align="center">
1667
- <br/>
1668
- <i>🌸 Dibuat dengan cinta dan dedikasi oleh <b>NuiiS4TORU</b> 💖</i><br/>
1669
- <i>✨ Semoga library ini membawa kebahagiaan dalam setiap project-mu~ 🌷</i>
1670
- <br/><br/>
1861
+
1862
+ *Dibuat dengan dedikasi oleh **NuiiS4TORU***
1863
+
1671
1864
  </div>