📋 Table of Contents
✨ Features
| 🔘 Interactive Messages | buttons, lists, native flow, carousel |
| 🤖 AIRich Response | rich message, table, code block formatting |
| 📰 Newsletter Support | media upload, subscribe management |
| 🖼️ Album Messages | group image/video albums |
| 📡 Group Status | group & channel status support |
| 🏷️ Sticker Pack | full sticker pack send support |
| 📊 Poll & Quiz | poll, quiz, poll result messages |
| 💳 Payment Messages | invoice, payment invite, request payment |
| 🕶️ Spoiler & Ephemeral | wrap messages as spoiler or ephemeral |
| 🗄️ SQLite Auth State | persistent auth with SQLite |
🆕 v1.3.0 — fitur tambahan (port dari JAPofc/baileys, MIT)
await sock.sendMiniApp(jid, { title: 'App', body: 'Buka 👇', url: 'https://app.example', params: { ref: 'bot' },
secret: 'rahasia', expiresIn: 3600, openWebview: true })
const ui = new A2UI(); ui.root([ui.text('Halo', { variant: 'h1' }), ui.button(ui.text('Klik'))])
await sock.sendA2UIWidget(jid, { a2ui: ui, bodyText: 'tes' })
const { text } = await sock.transcribeMessage(m, { provider: openAIWhisperProvider({ apiKey }) })
await sock.sendScheduledCall(jid, { scheduledAt: Date.now() + 3600e3, callType: 'voice', title: 'Rapat' })
await sock.sendMentionAll(jid, 'Halo semua')
await sock.sendStatusMention({ text: 'hi' }, [jid1, jid2])
📦 Install
npm install github:jexkpinkman/JexkCode-baileys
🚀 Quick Start
import makeWASocket, { useMultiFileAuthState, DisconnectReason } from 'jexkcode'
import { Boom } from '@hapi/boom'
const { state, saveCreds } = await useMultiFileAuthState('auth_info')
const sock = makeWASocket({ auth: state })
sock.ev.on('creds.update', saveCreds)
sock.ev.on('connection.update', ({ connection, lastDisconnect }) => {
if (connection === 'close') {
const shouldReconnect = new Boom(lastDisconnect?.error)?.output?.statusCode !== DisconnectReason.loggedOut
if (shouldReconnect) connectToWhatsApp()
} else if (connection === 'open') {
console.log('Connected!')
}
})
💬 Message Examples
🔘 Interactive Button
await sock.sendMessage(jid, {
interactive: {
body: { text: 'Pilih menu:' },
footer: { text: 'JexkCode Bot' },
header: { hasMediaAttachment: false },
nativeFlowMessage: {
buttons: [
{ name: 'quick_reply', buttonParamsJson: JSON.stringify({ display_text: 'Menu', id: 'menu' }) },
{ name: 'quick_reply', buttonParamsJson: JSON.stringify({ display_text: 'Help', id: 'help' }) }
]
}
}
})
🤖 AIRich Response (Table)
await sock.sendMessage(jid, {
aiRich: {
message: { conversation: 'Data pengguna:' },
unifiedResponse: {
components: [{
type: 'table',
columns: [{ name: 'Nama' }, { name: 'Status' }],
rows: [
{ cells: [{ content: 'User A' }, { content: 'Aktif' }] },
{ cells: [{ content: 'User B' }, { content: 'Tidak Aktif' }] }
]
}]
}
}
})
🖼️ Album Message
await sock.sendMessage(jid, {
album: {
media: [
{ image: { url: 'https://...' }, caption: 'Foto 1' },
{ image: { url: 'https://...' }, caption: 'Foto 2' }
]
}
})
📊 Poll
await sock.sendMessage(jid, {
poll: {
name: 'Pilih warna favoritmu!',
values: ['Merah', 'Hijau', 'Biru'],
selectableCount: 1
}
})
🔐 Auth State Options
import { useMultiFileAuthState } from 'jexkcode'
const { state, saveCreds } = await useMultiFileAuthState('./auth_info')
import { useSingleFileAuthState } from 'jexkcode'
const { state, saveCreds } = await useSingleFileAuthState('./auth.json')
import { useSQLiteAuthState } from 'jexkcode'
const { state, saveCreds } = await useSQLiteAuthState('./auth.db')
📄 License
MIT License © 2026 jexkpinkman
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Created by jexkpinkman