<div align="center">

<img src="https://raw.githubusercontent.com/NuiiS4TORU/-nuisockets/refs/heads/main/nuiisweety.png" width="100%"/>

# @nuiisweety/baileys

*Fork dari [`@whiskeysockets/baileys`](https://github.com/WhiskeySockets/Baileys) v7.0.0-rc11*
*dikembangkan dengan sepenuh hati oleh **NuiiS4TORU***

[![npm version](https://img.shields.io/badge/npm-0.1.8-pink?style=flat-square&logo=npm)](https://www.npmjs.com/package/@nuiisweety/baileys)
[![license](https://img.shields.io/badge/license-MIT-lavender?style=flat-square)](LICENSE)
[![based on](https://img.shields.io/badge/based%20on-@whiskeysockets%2Fbaileys-orchid?style=flat-square)](https://github.com/WhiskeySockets/Baileys)

</div>

---

<details>
<summary>🗺️ Navigasi</summary>

🔌 **Koneksi & Setup** —
[Instalasi](#instalasi) ·
[QR Code](#koneksi-qr-code) ·
[Pairing Code](#koneksi-pairing-code) ·
[Browser Identity](#browser-identity) ·
[Opsi Koneksi](#opsi-koneksi)

📨 **Handle Pesan** —
[Terima Pesan](#terima-pesan) ·
[Handle Grup](#handle-grup)

📤 **Kirim Pesan** —
[Teks](#teks) ·
[Gambar](#gambar) ·
[Video](#video) ·
[Audio & Voice Note](#audio--voice-note) ·
[Dokumen](#dokumen) ·
[Sticker](#sticker) ·
[Lokasi](#lokasi) ·
[Kontak](#kontak)

💬 **Interaksi** —
[Reaksi](#reaksi) ·
[Poll](#poll) ·
[Poll Result](#poll-result) ·
[Poll Update](#poll-update) ·
[Forward](#forward) ·
[Hapus](#hapus-pesan) ·
[Edit](#edit-pesan) ·
[Pin](#pin-pesan)

✨ **Fitur Tambahan** —
[Album](#album) ·
[Event](#event) ·
[Group Status / Story](#group-status--group-story) ·
[Status Mention](#status-mention) ·
[Flow Reply](#flow-reply) ·
[Button Reply](#button-reply) ·
[Keep In Chat](#keep-in-chat) ·
[Scheduled Call](#scheduled-call) ·
[Group Invite](#group-invite) ·
[Product](#product)

🎁 **Wrapper** —
[View Once](#view-once) ·
[View Once V2](#view-once-v2) ·
[Ephemeral](#ephemeral) ·
[Spoiler](#spoiler) ·
[Group Status Wrap](#group-status-wrap) ·
[Lottie Sticker](#lottie-sticker) ·
[AI Icon](#ai-icon) ·
[Secure Meta Label](#secure-meta-service-label)

🎛️ **Interactive** —
[Buttons](#buttons) ·
[List Message](#list-message) ·
[Template Buttons](#template-buttons) ·
[Native Flow](#native-flow) ·
[Carousel](#carousel)

🤖 **Rich Message (AI)** —
[Text](#addtext) ·
[Code Block](#addcode) ·
[Table](#addtable) ·
[Image](#addimage) ·
[Video](#addvideo) ·
[Source](#addsource) ·
[Reels](#addreels) ·
[Product Card](#addproduct) ·
[Post](#addpost) ·
[Tip](#addtip) ·
[Suggest](#addsuggest) ·
[Map](#map-rich) ·
[LaTeX](#latex-rich) ·
[Grid Image](#grid-image-rich) ·
[Inline Image](#inline-image-rich) ·
[Dynamic/GIF](#dynamic--gif-rich) ·
[Content Items](#content-items-rich) ·
[Gabungan (richResponse)](#rich-response-gabungan) ·
[Terima & Decode](#terima--decode-rich-message)

🔧 **Lainnya** —
[List Reply](#list-reply) ·
[Sticker Pack](#sticker-pack) ·
[External Ad Reply](#external-ad-reply) ·
[Request Payment](#request-payment) ·
[Invoice](#invoice) ·
[Order](#order) ·
[Disappearing Messages](#disappearing-messages) ·
[Raw Message](#raw-message)

</details>

---

<details>
<summary>📦 Instalasi</summary>

```js
// CommonJS
const { default: makeWASocket } = require('@nuiisweety/baileys')

// ESM
import makeWASocket from '@nuiisweety/baileys'
```

</details>

---

<details>
<summary>📱 Koneksi QR Code</summary>

```js
const {
  default: makeWASocket,
  useMultiFileAuthState,
  DisconnectReason,
  fetchLatestBaileysVersion
} = require('@nuiisweety/baileys')

async function start() {
  const { state, saveCreds } = await useMultiFileAuthState('auth_info')
  const { version } = await fetchLatestBaileysVersion()

  const sock = makeWASocket({
    version,
    auth: state,
    printQRInTerminal: true
  })

  sock.ev.on('creds.update', saveCreds)
  sock.ev.on('connection.update', ({ connection, lastDisconnect }) => {
    if (connection === 'close') {
      const code = lastDisconnect?.error?.output?.statusCode
      if (code !== DisconnectReason.loggedOut) start()
    } else if (connection === 'open') {
      console.log('Connected!')
    }
  })
}
start()
```

</details>

---

<details>
<summary>🔑 Koneksi Pairing Code</summary>

> Cocok untuk server/VPS tanpa tampilan terminal.

```js
const sock = makeWASocket({ version, auth: state, printQRInTerminal: false })

sock.ev.on('creds.update', saveCreds)
sock.ev.on('connection.update', ({ connection, lastDisconnect }) => {
  if (connection === 'close') {
    if (lastDisconnect?.error?.output?.statusCode !== DisconnectReason.loggedOut) start()
  }
})

// Nomor HP format internasional tanpa +
if (!sock.authState.creds.registered) {
  const code = await sock.requestPairingCode('628123456789')
  console.log('Pairing code:', code)
}

// Custom pairing code (8 karakter)
const code = await sock.requestPairingCode('628123456789', 'NUYY2822')
```

</details>

---

<details>
<summary>🌐 Browser Identity</summary>

```js
const { Browsers } = require('@nuiisweety/baileys')

makeWASocket({
  browser: Browsers.macOS('Chrome'),    // Mac OS — Chrome
  browser: Browsers.macOS('Firefox'),   // Mac OS — Firefox
  browser: Browsers.windows('Chrome'),  // Windows — Chrome
  browser: Browsers.ubuntu('Chrome'),   // Ubuntu — Chrome
  browser: Browsers.baileys('Chrome'),  // Baileys — Chrome
  browser: ['MyBot', 'Chrome', '1.0.0'] // custom
})
```

</details>

---

<details>
<summary>⚙️ Opsi Koneksi</summary>

```js
makeWASocket({
  version,
  auth: state,
  printQRInTerminal: true,
  browser: Browsers.macOS('Chrome'),
  connectTimeoutMs: 20000,
  keepAliveIntervalMs: 30000,
  markOnlineOnConnect: true,
  syncFullHistory: false,
  generateHighQualityLinkPreview: false,
  emitOwnEvents: true,
  getMessage: async key => store?.messages?.[key.remoteJid]?.get(key.id)?.message
})
```

</details>

---

<details>
<summary>📬 Terima Pesan</summary>

```js
sock.ev.on('messages.upsert', async ({ messages, type }) => {
  if (type !== 'notify') return

  for (const m of messages) {
    if (!m.message) continue
    if (m.key.fromMe) continue

    const jid = m.key.remoteJid
    const isGroup = jid.endsWith('@g.us')
    const sender = isGroup ? m.key.participant : jid

    const text =
      m.message.conversation ||
      m.message.extendedTextMessage?.text ||
      m.message.imageMessage?.caption ||
      m.message.videoMessage?.caption || ''

    await sock.readMessages([m.key])
    await sock.sendPresenceUpdate('composing', jid)
  }
})
```

</details>

---

<details>
<summary>👥 Handle Grup</summary>

```js
// Anggota masuk/keluar
sock.ev.on('group-participants.update', ({ id, participants, action }) => {
  // action: 'add' | 'remove' | 'promote' | 'demote'
})

// Info grup diupdate
sock.ev.on('groups.update', updates => {})

// Metadata grup
const meta = await sock.groupMetadata(groupJid)
console.log(meta.subject, meta.participants)

// Semua grup
const groups = await sock.groupFetchAllParticipating()

// Tambah / keluarkan / promote / demote
await sock.groupParticipantsUpdate(groupJid, ['628xxx@s.whatsapp.net'], 'add')
await sock.groupParticipantsUpdate(groupJid, ['628xxx@s.whatsapp.net'], 'remove')
await sock.groupParticipantsUpdate(groupJid, ['628xxx@s.whatsapp.net'], 'promote')
await sock.groupParticipantsUpdate(groupJid, ['628xxx@s.whatsapp.net'], 'demote')

// Ubah nama / deskripsi
await sock.groupUpdateSubject(groupJid, 'Nama Baru')
await sock.groupUpdateDescription(groupJid, 'Deskripsi baru')

// Kunci / buka grup
await sock.groupSettingUpdate(groupJid, 'announcement')
await sock.groupSettingUpdate(groupJid, 'not_announcement')

// Mention semua anggota
const meta2 = await sock.groupMetadata(groupJid)
const members = meta2.participants.map(p => p.id)
await sock.sendMessage(groupJid, {
  text: members.map(m => `@${m.split('@')[0]}`).join(' '),
  mentions: members
})
```

</details>

---

<details>
<summary>💬 Teks</summary>

```js
await sock.sendMessage(jid, { text: 'Halo!' })

// Dengan mention
await sock.sendMessage(jid, {
  text: '@628xxx halo!',
  mentions: ['628xxx@s.whatsapp.net']
}, { quoted: m })
```

</details>

---

<details>
<summary>🖼️ Gambar</summary>

```js
// URL
await sock.sendMessage(jid, {
  image: { url: 'https://example.com/image.jpg' },
  caption: 'Keterangan'
})

// Buffer
await sock.sendMessage(jid, {
  image: fs.readFileSync('image.jpg'),
  caption: 'Keterangan'
})
```

</details>

---

<details>
<summary>🎬 Video</summary>

```js
await sock.sendMessage(jid, {
  video: { url: 'https://example.com/video.mp4' },
  caption: 'Keterangan',
  gifPlayback: false  // true = GIF looping
})

// Video note (bubble)
await sock.sendMessage(jid, {
  video: fs.readFileSync('video.mp4'),
  ptv: true
})
```

</details>

---

<details>
<summary>🎙️ Audio & Voice Note</summary>

```js
// Audio biasa
await sock.sendMessage(jid, {
  audio: { url: 'https://example.com/audio.mp3' },
  mimetype: 'audio/mpeg'
})

// Voice note (PTT)
await sock.sendMessage(jid, {
  audio: fs.readFileSync('voice.ogg'),
  mimetype: 'audio/ogg; codecs=opus',
  ptt: true
})
```

</details>

---

<details>
<summary>📄 Dokumen</summary>

```js
await sock.sendMessage(jid, {
  document: fs.readFileSync('file.pdf'),
  mimetype: 'application/pdf',
  fileName: 'dokumen.pdf',
  caption: 'File ini'
})
```

</details>

---

<details>
<summary>🎴 Sticker</summary>

```js
await sock.sendMessage(jid, { sticker: fs.readFileSync('sticker.webp') })
```

</details>

---

<details>
<summary>📍 Lokasi</summary>

```js
await sock.sendMessage(jid, {
  location: {
    degreesLatitude: -6.2088,
    degreesLongitude: 106.8456,
    name: 'Monas',
    address: 'Jakarta Pusat'
  }
})
```

</details>

---

<details>
<summary>👤 Kontak</summary>

```js
await sock.sendMessage(jid, {
  contacts: {
    displayName: 'Nama',
    contacts: [{
      vcard: 'BEGIN:VCARD\nVERSION:3.0\nFN:Nama\nTEL:+62812345678\nEND:VCARD'
    }]
  }
})
```

</details>

---

<details>
<summary>❤️ Reaksi</summary>

```js
await sock.sendMessage(jid, { react: { text: '❤️', key: m.key } })

// Hapus reaksi
await sock.sendMessage(jid, { react: { text: '', key: m.key } })
```

</details>

---

<details>
<summary>📊 Poll</summary>

```js
await sock.sendMessage(jid, {
  poll: {
    name: 'Pilih salah satu',
    values: ['Opsi A', 'Opsi B', 'Opsi C'],
    selectableCount: 1  // 0 = boleh pilih banyak
  }
})

// Poll dengan fitur tambahan
await sock.sendMessage(jid, {
  poll: {
    name: 'Nama Poll',
    values: ['Opsi A', 'Opsi B'],
    selectableCount: 1,
    endDate: new Date('2025-12-31'),
    hideVoter: true,
    canAddOption: false,
    toAnnouncementGroup: false
  }
})

// Quiz (Poll dengan jawaban benar)
await sock.sendMessage(jid, {
  poll: {
    name: 'Ibu kota Indonesia?',
    values: ['Jakarta', 'Surabaya', 'Bandung'],
    selectableCount: 1,
    pollType: 1,           // 1 = QUIZ
    correctAnswer: 'Jakarta'
  }
})
```

</details>

---

<details>
<summary>📈 Poll Result</summary>

```js
await sock.sendMessage(jid, {
  pollResult: {
    name: 'Nama Poll',
    votes: [
      { name: 'Opsi A', voteCount: 10 },
      { name: 'Opsi B', voteCount: 5 }
    ],
    pollType: 0  // 0 = POLL, 1 = QUIZ
  }
})
```

</details>

---

<details>
<summary>🔄 Poll Update</summary>

```js
await sock.sendMessage(jid, {
  pollUpdate: {
    key: pollMessage.key,
    vote: encryptedVotePayload,
    metadata: optionalMetadata
  }
})
```

</details>

---

<details>
<summary>↗️ Forward</summary>

```js
await sock.sendMessage(jid, {
  forward: targetMessage,
  force: true  // paksa tampil sebagai forwarded
})
```

</details>

---

<details>
<summary>🗑️ Hapus Pesan</summary>

```js
await sock.sendMessage(jid, { delete: m.key })
```

</details>

---

<details>
<summary>✏️ Edit Pesan</summary>

```js
await sock.sendMessage(jid, {
  text: 'Teks yang sudah diedit',
  edit: m.key
})
```

</details>

---

<details>
<summary>📌 Pin Pesan</summary>

```js
// Pin
await sock.sendMessage(jid, {
  pin: m.key,
  type: 1,
  time: 86400  // 86400=1hr | 604800=7hr | 2592000=30hr
})

// Unpin
await sock.sendMessage(jid, { pin: m.key, type: 2 })
```

</details>

---

<details>
<summary>🗂️ Album</summary>

```js
await sock.sendMessage(jid, {
  album: [
    { image: { url: 'https://example.com/1.jpg' }, caption: 'Foto 1' },
    { image: { url: 'https://example.com/2.jpg' }, caption: 'Foto 2' },
    { video: { url: 'https://example.com/vid.mp4' }, caption: 'Video' }
  ]
})
// minimal 2 media
```

</details>

---

<details>
<summary>📅 Event</summary>

```js
await sock.sendMessage(jid, {
  event: {
    name: 'Nama Acara',
    description: 'Deskripsi',
    startDate: new Date('2025-12-01T10:00:00'),
    endDate: new Date('2025-12-01T12:00:00'),
    location: {
      degreesLatitude: -6.2088,
      degreesLongitude: 106.8456,
      name: 'Monas, Jakarta'
    },
    extraGuestsAllowed: true
  }
})

// Event dengan scheduled call
await sock.sendMessage(jid, {
  event: {
    name: 'Meeting Online',
    startDate: new Date('2025-12-01T10:00:00'),
    call: 'audio',   // 'audio' | 'video'
    isScheduleCall: true
  }
})
```

</details>

---

<details>
<summary>📖 Group Status / Group Story</summary>

```js
// Teks
await sock.sendMessage(groupJid, {
  groupStatusMessage: { text: 'Status teks' }
})

// Gambar
await sock.sendMessage(groupJid, {
  groupStatusMessage: {
    image: { url: 'https://example.com/image.jpg' },
    caption: 'Keterangan'
  }
})

// Video
await sock.sendMessage(groupJid, {
  groupStatusMessage: {
    video: { url: 'https://example.com/video.mp4' },
    caption: 'Keterangan'
  }
})
```

</details>

---

<details>
<summary>🔁 Flow Reply</summary>

```js
await sock.sendMessage(jid, {
  flowReply: {
    name: 'quick_reply',
    paramsJson: '{"id":"btn1"}',
    text: 'Teks balasan',
    format: 1,
    version: 1
  }
})
```

</details>

---

<details>
<summary>🔘 Button Reply</summary>

```js
// Template button
await sock.sendMessage(jid, {
  buttonReply: { displayText: 'Opsi yang dipilih', id: 'btn_id', index: 0 },
  type: 'template'
})

// Plain button
await sock.sendMessage(jid, {
  buttonReply: { displayText: 'Opsi yang dipilih', id: 'btn_id' },
  type: 'plain'
})
```

</details>

---

<details>
<summary>📎 Keep In Chat</summary>

```js
await sock.sendMessage(jid, {
  keep: m.key,
  keepType: 1  // 1 = keep, 2 = unkeep
})
```

</details>

---

<details>
<summary>📞 Scheduled Call</summary>

```js
await sock.sendMessage(jid, {
  call: {
    time: Date.now() + 3600000,
    type: 1,  // 1 = voice, 2 = video
    title: 'Meeting'
  }
})
```

</details>

---

<details>
<summary>🔗 Group Invite</summary>

```js
await sock.sendMessage(jid, {
  groupInvite: {
    jid: 'xxx@g.us',
    inviteCode: 'kode',
    inviteExpiration: Date.now() + 86400000,
    subject: 'Nama Grup',
    text: 'Bergabunglah bersama kami'
  }
})
```

</details>

---

<details>
<summary>🛍️ Product</summary>

```js
await sock.sendMessage(jid, {
  product: {
    productImage: fs.readFileSync('produk.jpg'),
    productId: 'prod_123',
    title: 'Nama Produk',
    description: 'Deskripsi produk',
    currencyCode: 'IDR',
    priceAmount1000: 50000000,
    retailerId: 'sku_001',
    url: 'https://toko.example.com/produk'
  },
  businessOwnerJid: '628xxx@s.whatsapp.net'  // wajib diisi
})
```

</details>

---

<details>
<summary>👁️ View Once</summary>

```js
await sock.sendMessage(jid, {
  image: { url: 'https://example.com/image.jpg' },
  viewOnce: true
})
```

</details>

---

<details>
<summary>👁️ View Once V2</summary>

```js
await sock.sendMessage(jid, {
  image: { url: 'https://example.com/image.jpg' },
  viewOnceV2: true
})

// viewOnceV2Extension
await sock.sendMessage(jid, {
  image: { url: 'https://example.com/image.jpg' },
  viewOnceV2Extension: true
})
```

</details>

---

<details>
<summary>⏳ Ephemeral</summary>

```js
await sock.sendMessage(jid, {
  text: 'Pesan ini ephemeral',
  ephemeral: true
})
```

</details>

---

<details>
<summary>🙈 Spoiler</summary>

```js
await sock.sendMessage(jid, {
  image: { url: 'https://example.com/image.jpg' },
  caption: 'Spoiler!',
  spoiler: true
})
```

</details>

---

<details>
<summary>🎭 Group Status Wrap</summary>

```js
await sock.sendMessage(jid, {
  text: 'Status di grup ini',
  groupStatus: true
})
```

</details>

---

<details>
<summary>🎞️ Lottie Sticker</summary>

```js
await sock.sendMessage(jid, {
  sticker: fs.readFileSync('sticker.webp'),
  isLottie: true
})
```

</details>

---

<details>
<summary>🤖 AI Icon</summary>

```js
// Hanya untuk private chat (bukan grup)
await sock.sendMessage(jid, { text: 'Respons dari AI', ai: true })

await sock.sendMessage(jid, {
  image: { url: 'https://example.com/image.jpg' },
  caption: 'Dihasilkan oleh AI',
  ai: true
})
```

</details>

---

<details>
<summary>🔒 Secure Meta Service Label</summary>

```js
await sock.sendMessage(jid, {
  text: 'Pesan layanan resmi',
  secureMetaServiceLabel: true
})
```

</details>

---

<details>
<summary>🎛️ Buttons</summary>

```js
// Teks dengan tombol
await sock.sendMessage(jid, {
  text: 'Pilih salah satu',
  footer: 'Footer pesan',
  buttons: [
    { id: 'btn1', text: 'Tombol 1' },
    { id: 'btn2', text: 'Tombol 2' },
    { id: 'btn3', text: 'Tombol 3' }
  ]
})

// Gambar sebagai header
await sock.sendMessage(jid, {
  image: { url: 'https://example.com/image.jpg' },
  caption: 'Isi pesan',
  footer: 'Footer',
  buttons: [
    { id: 'btn1', text: 'Pilih A' },
    { id: 'btn2', text: 'Pilih B' }
  ]
})

// Native flow button
await sock.sendMessage(jid, {
  text: 'Pilih menu',
  buttons: [{
    text: 'Buka Menu',
    sections: [{
      title: 'Kategori A',
      rows: [
        { id: 'row1', title: 'Item 1', description: 'Deskripsi' },
        { id: 'row2', title: 'Item 2' }
      ]
    }]
  }]
})
```

</details>

---

<details>
<summary>📋 List Message</summary>

```js
await sock.sendMessage(jid, {
  text: 'Silakan pilih',
  title: 'Judul List',
  buttonText: 'Buka Daftar',
  footer: 'Footer pesan',
  sections: [
    {
      title: 'Bagian 1',
      rows: [
        { id: 'row1', title: 'Pilihan A', description: 'Deskripsi A' },
        { id: 'row2', title: 'Pilihan B', description: 'Deskripsi B' }
      ]
    },
    {
      title: 'Bagian 2',
      rows: [
        { id: 'row3', title: 'Pilihan C' }
      ]
    }
  ]
})
```

</details>

---

<details>
<summary>🗃️ Template Buttons</summary>

```js
// Teks
await sock.sendMessage(jid, {
  text: 'Pesan template',
  footer: 'Footer',
  id: 'template-unik',
  templateButtons: [
    { id: 'btn1', text: 'Quick Reply' },
    { url: 'https://example.com', text: 'Kunjungi Website' },
    { call: '+62812345678', text: 'Hubungi Kami' }
  ]
})

// Gambar sebagai header
await sock.sendMessage(jid, {
  image: { url: 'https://example.com/img.jpg' },
  caption: 'Isi pesan',
  title: 'Judul',
  footer: 'Footer',
  templateButtons: [
    { id: 'btn1', text: 'Klik Sini' },
    { url: 'https://example.com', text: 'Buka Link' }
  ]
})
```

</details>

---

<details>
<summary>🌊 Native Flow</summary>

```js
// Teks dengan native flow buttons
await sock.sendMessage(jid, {
  text: 'Pilih aksi',
  footer: 'Footer pesan',
  nativeFlow: [
    { name: 'quick_reply', paramsJson: '{"id":"1"}', text: 'Opsi 1' },
    { name: 'quick_reply', paramsJson: '{"id":"2"}', text: 'Opsi 2' }
  ]
})

// Gambar sebagai header
await sock.sendMessage(jid, {
  image: { url: 'https://example.com/img.jpg' },
  caption: 'Isi pesan',
  title: 'Judul',
  subtitle: 'Subjudul',
  footer: 'Footer',
  nativeFlow: [
    { name: 'quick_reply', paramsJson: '{"id":"1"}', text: 'Tombol 1' }
  ]
})

// Dengan audio footer
await sock.sendMessage(jid, {
  text: 'Pesan dengan audio footer',
  audioFooter: fs.readFileSync('audio.ogg'),
  nativeFlow: [
    { name: 'quick_reply', paramsJson: '{"id":"1"}', text: 'OK' }
  ]
})

// Wrap sebagai templateMessage
await sock.sendMessage(jid, {
  text: 'Template interaktif',
  nativeFlow: [
    { name: 'quick_reply', paramsJson: '{"id":"1"}', text: 'Tombol' }
  ],
  interactiveAsTemplate: true,
  id: 'template-id-unik'
})
```

</details>

---

<details>
<summary>🎠 Carousel</summary>

```js
await sock.sendMessage(jid, {
  text: 'Carousel utama',
  footer: 'Footer utama',
  cards: [
    {
      image: { url: 'https://example.com/1.jpg' },
      title: 'Kartu 1',
      caption: 'Deskripsi kartu 1',
      footer: 'Footer kartu 1',
      nativeFlow: [
        { name: 'quick_reply', paramsJson: '{"id":"c1"}', text: 'Pilih Ini' }
      ]
    },
    {
      image: { url: 'https://example.com/2.jpg' },
      title: 'Kartu 2',
      caption: 'Deskripsi kartu 2',
      nativeFlow: [
        { name: 'quick_reply', paramsJson: '{"id":"c2"}', text: 'Pilih Itu' }
      ]
    }
  ]
})
```

</details>

---

<details>
<summary>🏷️ Status Mention</summary>

```js
// Kirim ke array JID untuk trigger status mention
await sock.sendMessage(['628xxx@s.whatsapp.net', 'yyy@g.us'], {
  text: 'Hei kamu!',
  backgroundColor: '#ff6b9d'
})

// Gambar dengan mention
await sock.sendMessage(['628xxx@s.whatsapp.net'], {
  image: { url: 'https://example.com/image.jpg' },
  caption: 'Untuk kamu'
})
```

> Untuk grup, otomatis pakai `groupStatusMentionMessage`.

</details>

---

<details>
<summary>🤖 Rich Message (AI)</summary>

> 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: [...]`.

### ✍️ addText

Kirim teks markdown sebagai AI Rich Response. Mendukung hyperlink, citation, dan LaTeX inline.

```js
await sock.sendMessage(jid, {
  contentText: 'Ini teks dari AI dengan *markdown* dan **bold**.',
  headerText: 'Judul',
  footerText: 'Footer',
  disclaimerText: 'Generated by AI'
})
```

---

### 💻 addCode

Kirim blok kode dengan syntax highlighting.

```js
await sock.sendMessage(jid, {
  code: 'console.log("Hello World!")',
  language: 'javascript',  // default: 'javascript'
  headerText: 'Contoh kode:',
  footerText: 'Semoga membantu',
  disclaimerText: 'Generated by AI'
})
```

**Bahasa yang didukung:**

| Bahasa | Key |
|--------|-----|
| JavaScript | `javascript`, `js` |
| TypeScript | `typescript`, `ts` |
| Python | `python`, `py` |
| Go | `go`, `golang` |
| C++ | `cpp`, `c++` |
| Rust | `rust`, `rs` |
| Java | `java` |
| PHP | `php` |
| Ruby | `ruby`, `rb` |
| Kotlin | `kotlin`, `kt` |
| Swift | `swift` |
| C | `c` |
| SQL/MySQL/PostgreSQL | `sql`, `mysql`, `postgresql`, `sqlite` |
| Bash/Shell | `bash`, `sh`, `shell` |
| HTML | `html` |
| CSS | `css` |
| JSON | `json` |
| YAML | `yaml`, `yml` |

---

### 📊 addTable

Kirim tabel dari array 2D. Baris pertama otomatis menjadi header.

```js
await sock.sendMessage(jid, {
  table: [
    ['Nama', 'Usia', 'Kota'],   // baris pertama = header
    ['Hana', '20', 'Jakarta'],
    ['Risa', '22', 'Bandung'],
    ['Yuki', '21', 'Surabaya']
  ],
  title: 'Data Anggota',
  headerText: 'Berikut datanya',
  footerText: 'Data per Juni 2025'
})

// Tanpa baris header
await sock.sendMessage(jid, {
  table: [
    ['Item A', 'Rp 10.000'],
    ['Item B', 'Rp 20.000']
  ],
  noHeading: true,
  title: 'Daftar Harga'
})
```

---

### 🖼️ addImage

Kirim satu atau beberapa gambar sebagai grid image di AI Rich Response.

```js
// Satu gambar
await sock.sendMessage(jid, {
  richImage: 'https://example.com/photo.jpg',
  headerText: 'Gambar untuk kamu'
})

// Beberapa gambar (grid)
await sock.sendMessage(jid, {
  richImage: [
    'https://example.com/photo1.jpg',
    'https://example.com/photo2.jpg',
    'https://example.com/photo3.jpg'
  ],
  headerText: 'Koleksi gambar',
  footerText: 'Semoga suka'
})
```

> `image` menerima string URL atau array string URL. Berbeda dengan `gridImage` (format verbose), `image` adalah shorthand yang lebih praktis.

---

### 🎬 addVideo

Kirim satu atau beberapa video di AI Rich Response.

```js
// Satu video
await sock.sendMessage(jid, {
  richVideo: 'https://example.com/video.mp4',
  headerText: 'Video untuk kamu'
})

// Dengan durasi (format: 'url|durasi_detik')
await sock.sendMessage(jid, {
  richVideo: 'https://example.com/video.mp4|120',
  headerText: 'Video berdurasi 2 menit'
})

// Beberapa video
await sock.sendMessage(jid, {
  richVideo: [
    'https://example.com/video1.mp4|60',
    'https://example.com/video2.mp4|90'
  ],
  headerText: 'Playlist video'
})
```

> Format URL video: `'url'` atau `'url|durasi_detik'`. Durasi dalam satuan detik, default 0.

---

### 🔗 addSource

Kirim daftar sumber referensi/link sebagai search result card.

```js
await sock.sendMessage(jid, {
  source: [
    {
      url: 'https://example.com/artikel',
      title: 'Judul Artikel',
      display_name: 'Example.com',
      subtitle: 'Sumber terpercaya',
      favicon: 'https://example.com/favicon.ico'
    },
    {
      url: 'https://docs.example.com/api',
      title: 'Dokumentasi API',
      display_name: 'Docs',
      subtitle: 'Referensi lengkap'
    }
  ],
  headerText: 'Sumber referensi'
})
```

**Field tiap sumber:**

| Field | Tipe | Keterangan |
|-------|------|------------|
| `url` | string | URL tujuan (wajib) |
| `title` | string | Judul sumber |
| `display_name` | string | Nama tampilan |
| `subtitle` | string | Subjudul/deskripsi singkat |
| `favicon` | string | URL favicon (opsional) |
| `source_type` | string | Default `'THIRD_PARTY'` |

---

### 🎥 addReels

Kirim daftar reel/video carousel (horizontal scroll) seperti hasil rekomendasi konten.

```js
await sock.sendMessage(jid, {
  reels: [
    {
      username: 'creator1',
      videoUrl: 'https://example.com/reel1.mp4',
      thumbnailUrl: 'https://example.com/thumb1.jpg',
      profileIconUrl: 'https://example.com/avatar1.jpg',
      reels_title: 'Judul Reel 1',
      likes_count: 1200,
      view_count: 50000,
      shares_count: 300,
      reel_source: 'IG',
      is_verified: true
    },
    {
      username: 'creator2',
      videoUrl: 'https://example.com/reel2.mp4',
      thumbnailUrl: 'https://example.com/thumb2.jpg',
      profileIconUrl: 'https://example.com/avatar2.jpg',
      reels_title: 'Judul Reel 2',
      likes_count: 800,
      view_count: 20000,
      reel_source: 'TT'  // TikTok
    }
  ],
  headerText: 'Rekomendasi video'
})
```

**Field tiap reel:**

| Field | Tipe | Keterangan |
|-------|------|------------|
| `username` / `title` | string | Nama kreator |
| `videoUrl` / `url` | string | URL video |
| `thumbnailUrl` / `thumbnail` | string | URL thumbnail |
| `profileIconUrl` / `profile_url` | string | URL foto profil |
| `reels_title` | string | Judul reel |
| `likes_count` / `like` | number | Jumlah like |
| `view_count` / `view` | number | Jumlah views |
| `shares_count` / `share` | number | Jumlah share |
| `reel_source` / `source` | string | `'IG'`, `'TT'`, dll |
| `is_verified` / `verified` | boolean | Akun terverifikasi |

---

### 🛍️ addProduct

Kirim kartu produk (single atau horizontal scroll untuk banyak produk).

```js
// Satu produk (Single layout)
await sock.sendMessage(jid, {
  richProduct: {
    title: 'Nama Produk',
    brand: 'Nama Brand',
    price: 'Rp 150.000',
    sale_price: 'Rp 120.000',
    product_url: 'https://toko.example.com/produk',
    image_url: 'https://example.com/produk.jpg',
    icon_url: 'https://example.com/icon.jpg'
  },
  headerText: 'Rekomendasi produk untukmu'
})

// Beberapa produk (HScroll layout)
await sock.sendMessage(jid, {
  richProduct: [
    {
      title: 'Produk A',
      brand: 'Brand X',
      price: 'Rp 50.000',
      product_url: 'https://toko.example.com/a',
      image_url: 'https://example.com/a.jpg'
    },
    {
      title: 'Produk B',
      brand: 'Brand Y',
      price: 'Rp 75.000',
      sale_price: 'Rp 60.000',
      product_url: 'https://toko.example.com/b',
      image_url: 'https://example.com/b.jpg'
    }
  ],
  headerText: 'Produk pilihan hari ini'
})
```

**Field tiap produk:**

| Field | Tipe | Keterangan |
|-------|------|------------|
| `title` | string | Nama produk |
| `brand` | string | Nama brand |
| `price` | string | Harga normal (teks bebas, mis. `'Rp 50.000'`) |
| `sale_price` / `salePrice` | string | Harga diskon |
| `product_url` / `url` | string | Link produk |
| `image_url` / `image` | string | URL gambar utama |
| `icon_url` / `icon` | string | URL gambar tambahan |

> Kirim object tunggal → **Single layout**. Kirim array → **HScroll layout**.

---

### 📝 addPost

Kirim kartu post sosial media (Instagram, TikTok, dll) dalam horizontal scroll.

```js
// Satu post
await sock.sendMessage(jid, {
  richPost: {
    title: 'Judul Post',
    subtitle: 'Subjudul',
    username: 'namauser',
    profile_picture_url: 'https://example.com/avatar.jpg',
    is_verified: true,
    thumbnail_url: 'https://example.com/thumb.jpg',
    post_caption: 'Caption post ini',
    likes_count: 5000,
    comments_count: 200,
    shares_count: 100,
    post_url: 'https://instagram.com/p/xxx',
    post_deeplink: 'instagram://post/xxx',
    source_app: 'INSTAGRAM',
    footer_label: 'Lihat di Instagram',
    orientation: 'LANDSCAPE',  // 'LANDSCAPE' | 'PORTRAIT'
    post_type: 'VIDEO'          // 'VIDEO' | 'IMAGE'
  },
  headerText: 'Post terpopuler'
})

// Beberapa post (carousel horizontal)
await sock.sendMessage(jid, {
  richPost: [
    {
      username: 'user1',
      thumbnail_url: 'https://example.com/thumb1.jpg',
      post_caption: 'Caption post pertama',
      likes_count: 3000,
      post_url: 'https://instagram.com/p/aaa',
      source_app: 'INSTAGRAM'
    },
    {
      username: 'user2',
      thumbnail_url: 'https://example.com/thumb2.jpg',
      post_caption: 'Caption post kedua',
      likes_count: 1500,
      post_url: 'https://tiktok.com/@user2/video/yyy',
      source_app: 'TIKTOK'
    }
  ],
  headerText: 'Post trending hari ini'
})
```

**Field tiap post:**

| Field | Tipe | Keterangan |
|-------|------|------------|
| `title` | string | Judul post |
| `subtitle` | string | Subjudul |
| `username` | string | Nama pengguna |
| `profile_picture_url` / `profile_url` | string | URL foto profil |
| `is_verified` / `verified` | boolean | Akun terverifikasi |
| `thumbnail_url` / `thumbnail` | string | URL thumbnail post |
| `post_caption` / `caption` | string | Caption/teks post |
| `likes_count` / `like` | number | Jumlah like |
| `comments_count` / `comment` | number | Jumlah komentar |
| `shares_count` / `share` | number | Jumlah share |
| `post_url` / `url` | string | URL post |
| `post_deeplink` / `deeplink` | string | Deeplink aplikasi |
| `source_app` / `source` | string | `'INSTAGRAM'`, `'TIKTOK'`, dll |
| `footer_label` / `footer` | string | Teks footer |
| `footer_icon` / `icon` | string | URL ikon footer |
| `orientation` | string | `'LANDSCAPE'` atau `'PORTRAIT'` |
| `post_type` | string | `'VIDEO'` atau `'IMAGE'` |

---

### 💡 addTip

Kirim teks pendek sebagai metadata/tip (tampil lebih kecil dan subtle).

```js
await sock.sendMessage(jid, {
  tip: 'Informasi ini dibuat oleh AI berdasarkan data terbaru.',
  headerText: 'Ringkasan'
})

// Dikombinasikan dengan tipe lain
await sock.sendMessage(jid, {
  contentText: 'Berikut jawabannya...',
  tip: 'Jawaban mungkin tidak selalu akurat. Verifikasi mandiri disarankan.'
})
```

---

### 🔮 addSuggest

Kirim saran prompt follow-up sebagai pill buttons yang bisa langsung diklik user.

```js
// Satu saran
await sock.sendMessage(jid, {
  contentText: 'Begitulah penjelasannya.',
  suggest: 'Jelaskan lebih detail'
})

// Beberapa saran
await sock.sendMessage(jid, {
  contentText: 'Apakah ada yang ingin kamu tanyakan?',
  suggest: [
    'Contoh kodenya?',
    'Apa perbedaannya?',
    'Kapan sebaiknya digunakan?',
    'Ada alternatif lain?'
  ]
})
```

> Saran tampil sebagai pill button di bawah pesan. Saat user mengetuk salah satu, teks saran tersebut akan terkirim sebagai pesan baru.

---

### 🖼️ Grid Image (Rich)

Kirim grid gambar dengan format verbose (object URL lengkap).

> Untuk pemakaian praktis, gunakan shorthand [`image`](#addimage).

```js
// Object URL lengkap (recommended untuk kontrol penuh)
await sock.sendMessage(jid, {
  gridImage: {
    gridImageUrl: {
      imagePreviewUrl: 'https://picsum.photos/id/10/300/300',
      imageHighResUrl: 'https://picsum.photos/id/10/1200/1200',
      sourceUrl: 'https://picsum.photos'
    },
    imageUrls: [
      {
        imagePreviewUrl: 'https://picsum.photos/id/11/300/300',
        imageHighResUrl: 'https://picsum.photos/id/11/1200/1200',
        sourceUrl: 'https://picsum.photos'
      }
    ]
  },
  headerText: 'Hasil pencarian gambar'
})

// String URL (shorthand)
await sock.sendMessage(jid, {
  gridImage: {
    gridImageUrl: 'https://picsum.photos/id/10/300/300',
    imageUrls: ['https://picsum.photos/id/11/300/300']
  },
  headerText: 'Hasil pencarian gambar'
})
```

---

### 📸 Inline Image (Rich)

Kirim gambar yang muncul inline di dalam teks.

```js
await sock.sendMessage(jid, {
  inlineImage: {
    imageUrl: 'https://picsum.photos/id/237/300/300',
    imageText: 'Ilustrasi gambar',
    alignment: 2,    // 0 = leading, 1 = trailing, 2 = center
    tapLinkUrl: 'https://picsum.photos'
  },
  headerText: 'Berikut ilustrasinya',
  footerText: 'Tap gambar untuk detail'
})
```

---

### 🎞️ Dynamic / GIF (Rich)

Kirim animasi atau GIF.

```js
await sock.sendMessage(jid, {
  dynamic: {
    url: 'https://example.com/animation.gif',
    type: 2,        // 1 = IMAGE, 2 = GIF
    version: 1,
    loopCount: 0    // 0 = loop selamanya
  },
  headerText: 'Animasi untuk kamu'
})
```

---

### 🗺️ Map (Rich)

Kirim peta interaktif dengan anotasi lokasi.

```js
// Satu lokasi
await sock.sendMessage(jid, {
  map: {
    centerLatitude: -6.2088,
    centerLongitude: 106.8456,
    latitudeDelta: 0.05,
    longitudeDelta: 0.05,
    showInfoList: true,
    annotations: [
      {
        number: 1,
        latitude: -6.2088,
        longitude: 106.8456,
        title: 'Jakarta Pusat',
        body: 'Ibu kota Indonesia'
      }
    ]
  },
  headerText: 'Lokasi yang kamu cari'
})

// Multi-lokasi
await sock.sendMessage(jid, {
  map: {
    centerLatitude: -7.2575,
    centerLongitude: 112.7521,
    latitudeDelta: 0.1,
    longitudeDelta: 0.1,
    showInfoList: true,
    annotations: [
      { number: 1, latitude: -7.2575, longitude: 112.7521, title: 'Surabaya', body: 'Kota Pahlawan' },
      { number: 2, latitude: -7.9797, longitude: 112.6304, title: 'Malang', body: 'Kota Bunga' }
    ]
  },
  headerText: 'Kota-kota di Jawa Timur'
})
```

---

### 🧮 LaTeX (Rich)

Kirim rumus matematika dalam format LaTeX.

> `url` di setiap expression akan **otomatis di-generate** dari [latex.codecogs.com](https://latex.codecogs.com) jika tidak diisi.

```js
// Satu rumus
await sock.sendMessage(jid, {
  latex: {
    text: 'Berikut rumus yang kamu minta:',
    expressions: [
      { expression: 'E = mc^2', width: 120, height: 40 }
    ]
  },
  headerText: 'Rumus Einstein',
  footerText: 'E = energi, m = massa, c = kecepatan cahaya'
})

// Beberapa rumus
await sock.sendMessage(jid, {
  latex: {
    text: 'Rumus-rumus fisika dasar:',
    expressions: [
      { expression: 'F = ma', width: 80, height: 35 },
      { expression: 'v = u + at', width: 100, height: 35 },
      { expression: 's = ut + \\frac{1}{2}at^2', width: 160, height: 50 }
    ]
  },
  headerText: 'Hukum Newton',
  disclaimerText: 'Fisika dasar kelas 10'
})
```



---

### 🧮 generateLatexContent / sendLatex (Standalone)

Fungsi standalone kompatibel dengan upstream baileys. Bisa dipanggil langsung dari socket:

```js
const { generateLatexContent, generateLatexImageContent, generateLatexInlineImageContent } = require('@nuiisweety/baileys')

// sendLatex — URL auto-generate via codecogs jika tidak diisi
await sock.sendLatex(jid, m, {
  text: 'Rumus Pythagoras:',
  expressions: [
    { latexExpression: 'a^2 + b^2 = c^2', width: 150, height: 45 }
  ],
  headerText: 'Matematika',
  footer: 'Semoga paham!'
})

// sendLatexImage — render ke PNG dulu, lalu upload
await sock.sendLatexImage(jid, m, {
  expressions: [{ latexExpression: 'E = mc^2' }]
}, renderLatexToPng, sock.waUploadToServer)

// sendLatexInlineImage — render ke PNG, kirim sebagai InlineImage per expression
await sock.sendLatexInlineImage(jid, m, {
  expressions: [{ latexExpression: '\\int_0^\\infty e^{-x} dx = 1' }]
}, renderLatexToPng, sock.waUploadToServer)
```

### 📊 sendTable / sendTableV2 / sendList (Standalone)

```js
// sendTable — format V1
await sock.sendTable(jid, 'Data Kota', ['Kota', 'Populasi'], [['Jakarta', '10jt'], ['Surabaya', '3jt']], m)

// sendList
await sock.sendList(jid, 'Daftar Belanja', ['Apel', 'Jeruk', 'Mangga'], m)
```

### 💻 sendCodeBlock / sendCodeBlockV2 (Standalone)

```js
await sock.sendCodeBlock(jid, 'console.log("Hello")', m, { language: 'javascript', title: 'Contoh JS' })
```

### 🔗 sendLink / sendLinkV2 (Standalone)

```js
await sock.sendLink(jid, 'Kunjungi dokumentasi ini', [{ url: 'https://docs.example.com', displayName: 'Docs' }], m)
```

### 🎁 sendRichMessage / sendUnifiedResponse / captureUnifiedResponse (Standalone)

```js
// Kirim array submessage mentah
await sock.sendRichMessage(jid, [
  { messageType: 2, messageText: 'Teks pertama' },
  { messageType: 2, messageText: 'Teks kedua' }
], m)

// Capture dan forward unified response
const captured = sock.captureUnifiedResponse(existingMsg.message)
if (captured) await sock.sendUnifiedResponse(jid, m, captured)
```
---

### 📦 Content Items (Rich)

Kirim carousel konten (reel/video) dengan format verbose.

> Untuk pemakaian praktis, gunakan shorthand [`reels`](#addreels).

```js
await sock.sendMessage(jid, {
  contentItems: {
    contentType: 1,  // 0 = DEFAULT, 1 = CAROUSEL
    items: [
      {
        kind: 'reel',
        title: 'Tutorial Coding JavaScript',
        profileIconUrl: 'https://example.com/avatar1.jpg',
        thumbnailUrl: 'https://example.com/thumb1.jpg',
        videoUrl: 'https://example.com/video1.mp4'
      },
      {
        kind: 'reel',
        title: 'Belajar React Hooks',
        profileIconUrl: 'https://example.com/avatar2.jpg',
        thumbnailUrl: 'https://example.com/thumb2.jpg',
        videoUrl: 'https://example.com/video2.mp4'
      }
    ]
  },
  headerText: 'Rekomendasi video'
})
```

---

### 🔗 Links (Rich)

Kirim teks dengan inline citation/reference link.

```js
await sock.sendMessage(jid, {
  links: [
    {
      text: 'Kunjungi dokumentasi',
      title: 'Docs',
      displayName: 'Baileys Docs',
      url: 'https://example.com/docs',
      sources: [
        {
          displayName: 'Source 1',
          subtitle: 'Sumber terpercaya',
          url: 'https://example.com/source'
        }
      ]
    }
  ],
  headerText: 'Referensi',
  footerText: 'Semoga berguna'
})
```

---

### 🎁 Rich Response (Gabungan)

Kirim kombinasi berbagai tipe Rich Message dalam satu pesan menggunakan mode array.

```js
// Kombinasi teks + kode + tabel
await sock.sendMessage(jid, {
  richResponse: [
    { text: 'Penjelasan singkat:' },
    { code: 'const x = 1 + 1', language: 'javascript' },
    {
      table: [['Kolom A', 'Kolom B'], ['Nilai 1', 'Nilai 2']],
      title: 'Hasil'
    },
    { text: 'Semoga membantu ya!' }
  ],
  disclaimerText: 'Generated by AI'
})

// Kombinasi dengan semua tipe baru
await sock.sendMessage(jid, {
  richResponse: [
    { text: 'Berikut hasilnya:' },
    { richImage: ['https://example.com/img1.jpg', 'https://example.com/img2.jpg'] },
    { source: [{ url: 'https://example.com', title: 'Sumber Data' }] },
    { code: 'print("Hello")', language: 'python' },
    {
      product: [
        { title: 'Produk A', price: 'Rp 50.000', image_url: 'https://example.com/a.jpg', product_url: 'https://example.com/a' },
        { title: 'Produk B', price: 'Rp 75.000', image_url: 'https://example.com/b.jpg', product_url: 'https://example.com/b' }
      ]
    },
    {
      post: [
        { username: 'user1', thumbnail_url: 'https://example.com/t1.jpg', post_url: 'https://ig.com/p/aaa', source_app: 'INSTAGRAM', likes_count: 1000 }
      ]
    },
    { tip: 'Informasi ini dihasilkan secara otomatis.' },
    { suggest: ['Tanya lebih lanjut', 'Lihat contoh lain', 'Mulai dari awal'] }
  ],
  disclaimerText: 'Powered by AI'
})
```

</details>

---

<details>
<summary>📥 Terima & Decode Rich Message</summary>

```js
const { normalizeMessageContent, parseRichMessage } = require('@nuiisweety/baileys')

sock.ev.on('messages.upsert', async ({ messages }) => {
  for (const msg of messages) {
    const inner = normalizeMessageContent(msg.message)
    const parsed = parseRichMessage(inner?.richResponseMessage)

    if (!parsed) continue

    for (const sub of parsed.submessages) {
      switch (sub.type) {
        case 'text':
          console.log('Teks:', sub.text)
          break
        case 'code':
          console.log('Kode (' + sub.language + '):', sub.raw)
          break
        case 'table':
          console.log('Tabel:', sub.title, sub.rows)
          break
        case 'gridImage':
          console.log('Grid Image:', sub.gridImageUrl, sub.imageUrls)
          break
        case 'inlineImage':
          console.log('Inline Image:', sub.imageUrl, sub.imageText)
          break
        case 'dynamic':
          console.log('Dynamic:', sub.url, sub.dynamicType === 2 ? 'GIF' : 'Image')
          break
        case 'map':
          console.log('Map:', sub.centerLatitude, sub.centerLongitude)
          break
        case 'latex':
          console.log('LaTeX:', sub.text, sub.expressions)
          break
        case 'contentItems':
          console.log('Content Items:', sub.contentType, sub.items)
          break
      }
    }
  }
})
```

> `parseRichMessage` menerima `null` atau `undefined` dengan aman — return `null` jika tidak ada rich message.

</details>

---

<details>
<summary>📃 List Reply</summary>

```js
await sock.sendMessage(jid, {
  listReply: {
    title: 'Pilihan Saya',
    description: 'Deskripsi pilihan',
    id: 'row1'  // selectedRowId dari baris yang dipilih
  }
})
```

</details>

---

<details>
<summary>🎴 Sticker Pack</summary>

```js
await sock.sendMessage(jid, {
  cover: fs.readFileSync('cover.webp'),  // wajib
  name: 'Pack Manis',
  publisher: 'NuiiS4TORU',
  description: 'Sticker pack cantik',
  stickers: [
    {
      data: fs.readFileSync('sticker1.webp'),
      emojis: ['🌸', '💕'],
      accessibilityLabel: 'stiker manis'
    },
    {
      data: { url: 'https://example.com/sticker2.webp' },
      emojis: ['🌷']
    }
    // maksimal 60 sticker
  ]
})
```

</details>

---

<details>
<summary>📢 External Ad Reply</summary>

```js
await sock.sendMessage(jid, {
  text: 'Cek produk ini',
  externalAdReply: {
    title: 'Judul Iklan',
    body: 'Deskripsi iklan',
    thumbnail: fs.readFileSync('thumbnail.jpg'),  // harus Buffer
    url: 'https://example.com/produk',
    mediaType: 1,  // 1 = image
    largeThumbnail: false
  }
})
```

</details>

---

<details>
<summary>💳 Request Payment</summary>

```js
await sock.sendMessage(jid, {
  text: 'Tolong transfer ya',
  requestPaymentFrom: '628xxx@s.whatsapp.net',
  amount1000: 50000000,      // Rp 50.000 (unit 1/1000)
  currencyCodeIso4217: 'IDR',
  expiryTimestamp: Date.now() + 86400000  // kadaluarsa 1 hari
})
```

</details>

---

<details>
<summary>🧾 Invoice</summary>

```js
// Dengan gambar
await sock.sendMessage(jid, {
  image: fs.readFileSync('invoice.jpg'),
  invoiceNote: 'Invoice pembelian\nTotal: Rp 150.000'
})

// Dengan PDF
await sock.sendMessage(jid, {
  document: fs.readFileSync('invoice.pdf'),
  mimetype: 'application/pdf',
  fileName: 'invoice.pdf',
  invoiceNote: 'Terima kasih atas pesananmu'
})
```

</details>

---

<details>
<summary>📦 Order</summary>

```js
await sock.sendMessage(jid, {
  order: {
    orderId: 'order_001',
    thumbnail: fs.readFileSync('produk.jpg'),  // wajib
    itemCount: 3,
    status: 'PAYMENT_PENDING',
    surface: 'CATALOG',
    message: 'Pesanan kamu sedang diproses',
    orderTitle: 'Pesanan #001',
    sellerJid: '628xxx@s.whatsapp.net',
    token: 'token_unik',
    totalAmount1000: 150000000,  // Rp 150.000
    totalCurrencyCode: 'IDR'
  }
})
```

</details>

---

<details>
<summary>💨 Disappearing Messages</summary>

```js
// Aktifkan (86400 detik = 24 jam default)
await sock.sendMessage(groupJid, { disappearingMessagesInChat: true })

// Nonaktifkan
await sock.sendMessage(groupJid, { disappearingMessagesInChat: false })

// Durasi kustom (detik)
await sock.sendMessage(groupJid, { disappearingMessagesInChat: 604800 })  // 7 hari
```

> Hanya berfungsi di grup (`@g.us`).

</details>

---

<details>
<summary>⚡ Raw Message</summary>

```js
await sock.sendMessage(jid, {
  raw: true,
  extendedTextMessage: {
    text: 'Pesan raw langsung ke proto'
  }
})
```

> Ketika `raw: true` ada, semua properti lain diteruskan langsung sebagai WAProto message tanpa pemrosesan tambahan.

---

</details>

<div align="center">

*Dibuat dengan dedikasi oleh **NuiiS4TORU***

</div>
