{"_id":"@arthurxyzstudios/baileys","_rev":"10-732a03b96c1811f1f73b3fe39a903c64","name":"@arthurxyzstudios/baileys","dist-tags":{"latest":"1.0.7"},"versions":{"1.0.2":{"name":"@arthurxyzstudios/baileys","version":"1.0.2","keywords":["baileys","whatsapp","button","interactive","baileys-mod","whatsapp-bot"],"author":{"name":"ArthurXyz Studios"},"license":"MIT","_id":"@arthurxyzstudios/baileys@1.0.2","maintainers":[{"name":"arthurxyzstudios","email":"adityabharaka@gmail.com"}],"homepage":"https://github.com/arthurxyzstudios/baileys#readme","bugs":{"url":"https://github.com/arthurxyzstudios/baileys/issues"},"dist":{"shasum":"f39fcc5ed540279a5546a70c619f77dffba85174","tarball":"https://registry.npmjs.org/@arthurxyzstudios/baileys/-/baileys-1.0.2.tgz","fileCount":10,"integrity":"sha512-JQlPQ7mKJ1VcV/g9PD9zT2LSloRhV97YMlcb3DvHGqwJuR2g1Jq9UtDymBbj4TMRpoufv0ZFh4h1z0UNnulK+A==","signatures":[{"sig":"MEYCIQDvKstlczRVFBmWqMn5nNIy0uF/GBQpZT3/ZsJXUw5swAIhAIGnMsIW2o/zX5DgApkqeaBeDRto5WS/ht3kh45cDVUq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8790},"main":"index.js","_npmUser":{"name":"arthurxyzstudios","email":"adityabharaka@gmail.com"},"repository":{"url":"git+https://github.com/arthurxyzstudios/baileys.git","type":"git"},"_npmVersion":"11.13.0","description":"Baileys modifikasi support semua tipe button dan interactive message","directories":{},"_nodeVersion":"25.8.2","dependencies":{"pino":"^10.3.1","qrcode-terminal":"^0.12.0","@whiskeysockets/baileys":"^7.0.0-rc11"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/baileys_1.0.2_1778790709918_0.47063202594169407","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@arthurxyzstudios/baileys","version":"1.0.3","keywords":["baileys","whatsapp","button","interactive","baileys-mod","whatsapp-bot"],"author":{"name":"ArthurXyz Studios"},"license":"MIT","_id":"@arthurxyzstudios/baileys@1.0.3","maintainers":[{"name":"arthurxyzstudios","email":"adityabharaka@gmail.com"}],"homepage":"https://github.com/arthurxyzstudios/baileys#readme","bugs":{"url":"https://github.com/arthurxyzstudios/baileys/issues"},"dist":{"shasum":"41a6abf1fdfeae688a295ec74776aa282a4c8f81","tarball":"https://registry.npmjs.org/@arthurxyzstudios/baileys/-/baileys-1.0.3.tgz","fileCount":10,"integrity":"sha512-BfcBHty82mcDv7ZaRNG9Jczzj5PYC67PD+6CF1OpxQylp4fL8oQmg9uHIcwE07XZFsbX93BtSkNFJNWNqAKJSg==","signatures":[{"sig":"MEUCIBHl3OlXDPNU5wzW7dSLbb+7JeuCuY1tyWUS3ZITcHqFAiEA5B/hUyXsUqpNrA1PGojiPGqOsj/zsacGrAUId2hysPA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9091},"main":"index.js","_npmUser":{"name":"arthurxyzstudios","email":"adityabharaka@gmail.com"},"repository":{"url":"git+https://github.com/arthurxyzstudios/baileys.git","type":"git"},"_npmVersion":"11.13.0","description":"Baileys modifikasi support semua tipe button dan interactive message","directories":{},"_nodeVersion":"25.8.2","dependencies":{"pino":"^10.3.1","qrcode-terminal":"^0.12.0","@whiskeysockets/baileys":"^7.0.0-rc11"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/baileys_1.0.3_1778790938413_0.9249913932671128","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@arthurxyzstudios/baileys","version":"1.0.4","keywords":["baileys","whatsapp","button","interactive","baileys-mod","whatsapp-bot"],"author":{"name":"ArthurXyz Studios"},"license":"MIT","_id":"@arthurxyzstudios/baileys@1.0.4","maintainers":[{"name":"arthurxyzstudios","email":"adityabharaka@gmail.com"}],"homepage":"https://github.com/arthurxyzstudios/baileys#readme","bugs":{"url":"https://github.com/arthurxyzstudios/baileys/issues"},"dist":{"shasum":"9e7dcedd57211822e857c3553a2f767abf62dc7e","tarball":"https://registry.npmjs.org/@arthurxyzstudios/baileys/-/baileys-1.0.4.tgz","fileCount":10,"integrity":"sha512-NZq2fOPWaktw1IBRktZrZmLdMe93PvVz3Bkfb8YJ4TFwzq2clVxkGwoPoFhI77RQalpCF5HHFXpBfbC2rSLM6A==","signatures":[{"sig":"MEUCIQDGwnSJsh9XHfR5m360lFGX0GXqS2piUw23I2MyHtCNXQIgC3w52OJCqYveE+iPr0qhzbqY+afJ7WFAS60ISZmutEs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9127},"main":"index.js","_npmUser":{"name":"arthurxyzstudios","email":"adityabharaka@gmail.com"},"repository":{"url":"git+https://github.com/arthurxyzstudios/baileys.git","type":"git"},"_npmVersion":"11.13.0","description":"Baileys modifikasi support semua tipe button dan interactive message","directories":{},"_nodeVersion":"25.8.2","dependencies":{"pino":"^10.3.1","qrcode-terminal":"^0.12.0","@whiskeysockets/baileys":"^7.0.0-rc11"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/baileys_1.0.4_1778791253501_0.4646428748631599","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@arthurxyzstudios/baileys","version":"1.0.5","keywords":["baileys","whatsapp","button","interactive","baileys-mod","whatsapp-bot"],"author":{"name":"ArthurXyz Studios"},"license":"MIT","_id":"@arthurxyzstudios/baileys@1.0.5","maintainers":[{"name":"arthurxyzstudios","email":"adityabharaka@gmail.com"}],"homepage":"https://github.com/arthurxyzstudios/baileys#readme","bugs":{"url":"https://github.com/arthurxyzstudios/baileys/issues"},"dist":{"shasum":"0709c54ef4e2bb594bc3d05ebc71c4dfdc5d5ec9","tarball":"https://registry.npmjs.org/@arthurxyzstudios/baileys/-/baileys-1.0.5.tgz","fileCount":12,"integrity":"sha512-5/3YssNfkvsw6p1ltpPLh+a4ZUgPhEGZSdKX33cb8cXCbJHShz6cPlliGbPgwJCIde8eGY5vTCxAvzAyiGCIhw==","signatures":[{"sig":"MEYCIQClv1gL8ZU1shLps1kdToAOYGjolTjkFKc/ylSFfh8tegIhAKkGFr1Jkn193N3alsvKlyGQFh+l2WCXV1DMPbJMLlkP","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6715},"main":"index.js","type":"module","_npmUser":{"name":"arthurxyzstudios","email":"adityabharaka@gmail.com"},"repository":{"url":"git+https://github.com/arthurxyzstudios/baileys.git","type":"git"},"_npmVersion":"11.13.0","description":"Baileys modifikasi support semua tipe button dan interactive message","directories":{},"_nodeVersion":"25.8.2","dependencies":{"pino":"^10.3.1","qrcode-terminal":"^0.12.0","@whiskeysockets/baileys":"^7.0.0-rc11"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/baileys_1.0.5_1778829107109_0.8679201872565807","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"@arthurxyzstudios/baileys","version":"1.0.6","keywords":["baileys","whatsapp","button","interactive","baileys-mod","whatsapp-bot"],"author":{"name":"ArthurXyz Studios"},"license":"MIT","_id":"@arthurxyzstudios/baileys@1.0.6","maintainers":[{"name":"arthurxyzstudios","email":"adityabharaka@gmail.com"}],"homepage":"https://github.com/arthurxyzstudios/baileys#readme","bugs":{"url":"https://github.com/arthurxyzstudios/baileys/issues"},"dist":{"shasum":"9591eb2e0161d61abb803c42471d1e229ae92962","tarball":"https://registry.npmjs.org/@arthurxyzstudios/baileys/-/baileys-1.0.6.tgz","fileCount":18,"integrity":"sha512-znYCjEXxBYaffVcxUYSUaXZwNfUEX0WdvCAEcMiNuXFfsMYXE1FNg66Iq79MZEdEDHuuftAmgCaEZCZDGHIq9Q==","signatures":[{"sig":"MEQCIQDnaVI3Mvm3NdonTOKZmM+9BDdrD4HxVZtcfT58GMMejQIfYBvEbkoo/9yowpndyklTkHEYGcAo592Ucp8avWuh9A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11004},"main":"index.js","type":"module","_npmUser":{"name":"arthurxyzstudios","email":"adityabharaka@gmail.com"},"repository":{"url":"git+https://github.com/arthurxyzstudios/baileys.git","type":"git"},"_npmVersion":"11.13.0","description":"Baileys modifikasi support semua tipe button dan interactive message","directories":{},"_nodeVersion":"25.8.2","dependencies":{"pino":"^10.3.1","qrcode-terminal":"^0.12.0","@whiskeysockets/baileys":"^7.0.0-rc11"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/baileys_1.0.6_1778830332948_0.21894067039497123","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"name":"@arthurxyzstudios/baileys","type":"module","version":"1.0.7","description":"WhatsApp Web API Library","author":{"name":"ArthurXyz Studios"},"main":"src/index.js","license":"GPL-3.0","scripts":{"preinstall":"node ./engine-requirements.js"},"dependencies":{"@cacheable/node-cache":"^1.4.0","@hapi/boom":"^9.1.3","async-mutex":"^0.5.0","libsignal":"git+https://github.com/whiskeysockets/libsignal-node.git","lru-cache":"^11.1.0","music-metadata":"^11.12.3","p-queue":"^9.0.0","pino":"^9.6","protobufjs":"^7.5.6","whatsapp-rust-bridge":"0.5.4","ws":"^8.13.0"},"peerDependencies":{"audio-decode":"^2.1.3","jimp":"^1.6.1","link-preview-js":"^3.0.0","sharp":"*"},"peerDependenciesMeta":{"audio-decode":{"optional":true},"jimp":{"optional":true},"link-preview-js":{"optional":true},"sharp":{"optional":true}},"engines":{"node":">=20.0.0"},"_id":"@arthurxyzstudios/baileys@1.0.7","_nodeVersion":"25.8.2","_npmVersion":"11.13.0","dist":{"integrity":"sha512-ok/8s4mx4/mV89vxKv/9TICO7iCz+S9OAX86DHztFzB/w/apD+VNK2ZJHtQb/XsNKnH9bPScOUnm1SeWxjNJqw==","shasum":"a11d759d5ad77d60a136bc892e9b8bd9033b89a6","tarball":"https://registry.npmjs.org/@arthurxyzstudios/baileys/-/baileys-1.0.7.tgz","fileCount":108,"unpackedSize":6188778,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCrHfqGwbVRXKJ/vVc9sPIe9Z5I4XvWPjCDQ22lxBBzuwIgDq+VcRmMeAG5wGEIqgE9TDKFssjIT/C9TJZDp6B/h+o="}]},"_npmUser":{"name":"arthurxyzstudios","email":"adityabharaka@gmail.com"},"directories":{},"maintainers":[{"name":"arthurxyzstudios","email":"adityabharaka@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/baileys_1.0.7_1779917709112_0.549255539224826"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-14T20:31:49.795Z","modified":"2026-05-27T21:35:09.680Z","1.0.0":"2026-05-14T18:46:52.044Z","1.0.1":"2026-05-14T19:53:45.508Z","1.0.2":"2026-05-14T20:31:50.059Z","1.0.3":"2026-05-14T20:35:38.557Z","1.0.4":"2026-05-14T20:40:53.641Z","1.0.5":"2026-05-15T07:11:47.305Z","1.0.6":"2026-05-15T07:32:13.108Z","1.0.7":"2026-05-27T21:35:09.506Z"},"author":{"name":"ArthurXyz Studios"},"license":"GPL-3.0","description":"WhatsApp Web API Library","maintainers":[{"name":"arthurxyzstudios","email":"adityabharaka@gmail.com"}],"readme":"<p align=\"center\">\n  <img src=\"https://capsule-render.vercel.app/api?type=waving&color=0:25D366,100:128C7E&height=200&section=header&text=yelib&fontSize=60&fontColor=fff&animation=fadeIn&fontAlignY=35\"/>\n</p>\n\n<p align=\"center\">\n  <strong>WhatsApp Web API Library</strong> &mdash; v1.0.0 &mdash; based on @whiskeysockets/baileys v7.0.0-rc10\n</p>\n\n<p align=\"center\">\n  <a href=\"https://github.com/miuujs/baileys/stargazers\">\n    <img src=\"https://img.shields.io/github/stars/miuujs/baileys?style=for-the-badge&color=25D366\" alt=\"Stars\"/>\n  </a>\n  <a href=\"https://github.com/miuujs/baileys/forks\">\n    <img src=\"https://img.shields.io/github/forks/miuujs/baileys?style=for-the-badge&color=128C7E\" alt=\"Forks\"/>\n  </a>\n  <a href=\"https://github.com/miuujs/baileys/issues\">\n    <img src=\"https://img.shields.io/github/issues/miuujs/baileys?style=for-the-badge&color=075E54\" alt=\"Issues\"/>\n  </a>\n  <a href=\"https://github.com/miuujs/baileys/blob/main/LICENSE\">\n    <img src=\"https://img.shields.io/badge/license-GPL--3.0-25D366?style=for-the-badge\" alt=\"License\"/>\n  </a>\n</p>\n\n> [!CAUTION]\n> NOTICE OF BREAKING CHANGE.\n>\n> As of this fork, multiple changes and additions have been introduced on top of the original Baileys v7.0.0-rc10 codebase.\n\n# Disclaimer\n\nThis project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with WhatsApp or any of its subsidiaries or its affiliates.\nThe official WhatsApp website can be found at whatsapp.com. \"WhatsApp\" as well as related names, marks, emblems and images are registered trademarks of their respective owners.\n\nThe maintainers of this project do not in any way condone the use of this application in practices that violate the Terms of Service of WhatsApp. The maintainers of this application call upon the personal responsibility of its users to use this application in a fair way, as it is intended to be used.\nUse at your own discretion. Do not spam people with this. We discourage any stalkerware, bulk or automated messaging usage.\n\n> [!IMPORTANT]\n> The original repository had to be removed by the original author &mdash; we now continue development in this repository here.\n> This is the only official repository and is maintained by the community.\n> **Official Channel**: [WhatsApp Channel](https://whatsapp.com/channel/0029VbCih2O1noz41RfWbV3X)\n\n---\n\n## Installation\n\n```bash\nnpm install github:miuujs/baileys\n```\n\nOr clone for development:\n\n```bash\ngit clone https://github.com/miuujs/baileys\ncd baileys\nnpm install\n```\n\nThis fork is ESM-only. Ensure your `package.json` contains `\"type\": \"module\"`.\n\n---\n\n## Quick Start\n\n```js\nimport makeWASocket, {\n  useMultiFileAuthState,\n  DisconnectReason,\n  Browsers\n} from 'baileys';\nimport pino from 'pino';\n\nconst logger = pino({ level: 'silent' });\n\nasync function startBot() {\n  const { state, saveCreds } = await useMultiFileAuthState('./session');\n\n  const sock = makeWASocket({\n    auth: state,\n    logger,\n    browser: Browsers.ubuntu('Chrome'),\n    syncFullHistory: false\n  });\n\n  sock.ev.on('creds.update', saveCreds);\n  sock.ev.on('connection.update', ({ connection, lastDisconnect, qr }) => {\n    if (qr) console.log('QR:', qr);\n    if (connection === 'close') {\n      const shouldReconnect =\n        lastDisconnect?.error?.output?.statusCode !== DisconnectReason.loggedOut;\n      if (shouldReconnect) startBot();\n    }\n    if (connection === 'open') console.log('Connected!');\n  });\n\n  sock.ev.on('messages.upsert', async ({ messages }) => {\n    const msg = messages[0];\n    if (!msg?.message || msg.key.fromMe) return;\n    const text = msg.message.conversation || msg.message.extendedTextMessage?.text || '';\n    if (text === '.ping') {\n      await sock.sendMessage(msg.key.remoteJid, { text: 'Pong!' });\n    }\n  });\n}\n\nstartBot();\n```\n\n---\n\n## Standard Messages\n\nBasic message types supported via `sock.sendMessage(jid, content, options)`.\n\n### Text\n```js\nawait sock.sendMessage(jid, { text: 'Hello World!' });\n```\n\n### Text with Mention\n```js\nawait sock.sendMessage(jid, {\n  text: 'Hello @628xxx!',\n  mentions: ['628xxx@s.whatsapp.net']\n});\n```\n\n### Image\n```js\nawait sock.sendMessage(jid, {\n  image: { url: './photo.jpg' },\n  caption: 'A photo'\n});\n```\n\n### Video\n```js\nawait sock.sendMessage(jid, {\n  video: { url: './video.mp4' },\n  caption: 'A video',\n  gifPlayback: false\n});\n```\n\n### Audio / Voice Note\n```js\nawait sock.sendMessage(jid, {\n  audio: { url: './audio.ogg' },\n  mimetype: 'audio/ogg; codecs=opus',\n  ptt: true\n});\n```\n\n### Sticker\n```js\nawait sock.sendMessage(jid, {\n  sticker: { url: './sticker.webp' }\n});\n```\n\n### Document\n```js\nawait sock.sendMessage(jid, {\n  document: { url: './file.pdf' },\n  fileName: 'document.pdf',\n  mimetype: 'application/pdf'\n});\n```\n\n### Location\n```js\nawait sock.sendMessage(jid, {\n  location: {\n    degreesLatitude: -6.2,\n    degreesLongitude: 106.8,\n    name: 'Jakarta'\n  }\n});\n```\n\n### Contact\n```js\nawait sock.sendMessage(jid, {\n  contacts: {\n    displayName: 'John Doe',\n    contacts: [{\n      vcard: 'BEGIN:VCARD\\nVERSION:3.0\\nFN:John Doe\\nTEL:+628xxx\\nEND:VCARD'\n    }]\n  }\n});\n```\n\n### Reaction\n```js\nawait sock.sendMessage(jid, {\n  react: { key: msg.key, text: '\\u2764\\uFE0F' }\n});\n```\n\n### Poll\n```js\nawait sock.sendMessage(jid, {\n  poll: {\n    name: 'Favorite Language?',\n    values: ['JavaScript', 'Python', 'Go'],\n    selectableCount: 1\n  }\n});\n```\n\n### Forward Message\n```js\nawait sock.sendMessage(jid, {\n  forward: msg,\n  forwardingScore: 1,\n  isForwarded: true\n});\n```\n\n### Delete Message\n```js\nawait sock.sendMessage(jid, { delete: msg.key });\n```\n\n### Edit Message\n```js\nawait sock.sendMessage(jid, {\n  text: 'Edited content',\n  edit: msg.key\n});\n```\n\n### Disappearing Messages\n```js\nawait sock.sendMessage(jid, { disappearingMessagesInChat: 86400 });\n```\n\n---\n\n## Advanced Messages\n\nThese message types are auto-detected and processed by the internal `MessageBuilders` system when passed through `sendMessage()`.\n\n### Native Flow Buttons\n\n```js\nawait sock.sendMessage(jid, {\n  interactiveMessage: {\n    title: 'Welcome!',\n    footer: 'Powered by yelib',\n    buttons: [\n      {\n        name: 'quick_reply',\n        buttonParamsJson: JSON.stringify({\n          display_text: 'Menu',\n          id: '.menu'\n        })\n      },\n      {\n        name: 'cta_url',\n        buttonParamsJson: JSON.stringify({\n          display_text: 'Website',\n          url: 'https://example.com'\n        })\n      },\n      {\n        name: 'cta_copy',\n        buttonParamsJson: JSON.stringify({\n          display_text: 'Copy Code',\n          copy_code: 'YELIB2024'\n        })\n      }\n    ],\n    header: 'Choose an option',\n    image: { url: 'https://example.com/banner.jpg' }\n  }\n});\n```\n\n### Button Types Reference\n\n| name | buttonParamsJson fields | Description |\n| ---- | ----------------------- | ----------- |\n| `quick_reply` | `display_text`, `id` | Sends the `id` back as a message |\n| `cta_url` | `display_text`, `url` | Opens a URL when tapped |\n| `cta_copy` | `display_text`, `copy_code` | Copies text to clipboard |\n| `single_select` | `title`, `sections` | Shows a list/select menu |\n| `call_permission_request` | `display_text`, `id` | Requests call permission |\n\n### Button Features\n\n| Feature | Field | Description |\n| ------- | ----- | ----------- |\n| Limited Time Offer | `limited_time_offer_seconds` | Shows countdown timer on button |\n| Bottom Sheet | `bottom_sheet` | Renders options as a bottom sheet |\n| Tap Target Config | `tap_target_configuration` | Custom tap target behavior |\n\n### List Menu (single_select)\n\n```js\nawait sock.sendMessage(jid, {\n  interactiveMessage: {\n    title: 'Select Category',\n    footer: 'Powered by yelib',\n    buttons: [\n      {\n        name: 'single_select',\n        buttonParamsJson: JSON.stringify({\n          title: 'Menu',\n          sections: [\n            {\n              title: 'Games',\n              rows: [\n                { title: 'Quiz', id: '.quiz' },\n                { title: 'Guess', id: '.guess' }\n              ]\n            },\n            {\n              title: 'Tools',\n              rows: [\n                { title: 'Sticker', id: '.sticker' },\n                { title: 'TTS', id: '.tts' }\n              ]\n            }\n          ]\n        })\n      }\n    ],\n    header: 'Bot Menu'\n  }\n});\n```\n\n### Carousel Message\n\n```js\nawait sock.sendMessage(jid, {\n  interactiveMessage: {\n    title: 'Our Products',\n    footer: 'Powered by yelib',\n    carouselMessage: {\n      cards: [\n        {\n          body: { text: 'Product A - Rp50,000' },\n          footer: { text: '10% off' },\n          header: { title: 'Product A' },\n          nativeFlowMessage: {\n            buttons: [{\n              name: 'quick_reply',\n              buttonParamsJson: JSON.stringify({ display_text: 'Buy', id: '.buy_a' })\n            }]\n          }\n        },\n        {\n          body: { text: 'Product B - Rp75,000' },\n          footer: { text: '15% off' },\n          header: { title: 'Product B' },\n          nativeFlowMessage: {\n            buttons: [{\n              name: 'quick_reply',\n              buttonParamsJson: JSON.stringify({ display_text: 'Buy', id: '.buy_b' })\n            }]\n          }\n        }\n      ],\n      messageVersion: 1\n    }\n  }\n});\n```\n\n### Album Message\n\nSend multiple images/videos as a grouped album:\n\n```js\nawait sock.sendMessage(jid, {\n  albumMessage: [\n    { image: { url: './photo1.jpg' }, caption: 'Photo 1' },\n    { image: { url: './photo2.jpg' }, caption: 'Photo 2' },\n    { video: { url: './video.mp4' }, caption: 'Video' }\n  ]\n});\n```\n\n### Event Message\n\n```js\nawait sock.sendMessage(jid, {\n  eventMessage: {\n    name: 'Community Meetup',\n    description: 'Join us for the monthly meetup!',\n    startTime: Date.now() + 86400000,\n    location: { degreesLatitude: -6.2, degreesLongitude: 106.8, name: 'Jakarta' }\n  }\n});\n```\n\n### Poll Result\n\n```js\nawait sock.sendMessage(jid, {\n  pollResultMessage: {\n    name: 'Favorite Language?',\n    pollVotes: [\n      { optionName: 'JavaScript', optionVoteCount: 42 },\n      { optionName: 'Python', optionVoteCount: 38 },\n      { optionName: 'Go', optionVoteCount: 15 }\n    ]\n  }\n});\n```\n\n### Product Message\n\n```js\nconst { imageMessage } = await prepareWAMessageMedia(\n  { image: { url: 'https://example.com/product.jpg' } },\n  { upload: sock.waUploadToServer }\n);\n\nawait sock.sendMessage(jid, {\n  productMessage: {\n    title: 'Product Name',\n    description: 'Product description',\n    thumbnail: { url: 'https://example.com/product.jpg' },\n    productId: 'P001',\n    retailerId: 'YELIB',\n    url: 'https://example.com/product',\n    body: 'Latest product!',\n    footer: 'yelib store',\n    buttons: [{ name: 'quick_reply', buttonParamsJson: JSON.stringify({ display_text: 'Buy Now', id: '.buy' }) }],\n    priceAmount1000: 50000000,\n    currencyCode: 'IDR'\n  }\n});\n```\n\n### Payment Request\n\n```js\nawait sock.sendMessage(jid, {\n  requestPaymentMessage: {\n    expiryTimestamp: Math.floor(Date.now() / 1000) + 86400,\n    amount1000: 50000,\n    currencyCodeIso4217: 'IDR',\n    requestFrom: '628xxx@s.whatsapp.net',\n    noteMessage: {\n      extendedTextMessage: { text: 'Payment for order #123' }\n    },\n    background: { id: 'DEFAULT', placeholderArgb: 0xfff0f0f0 }\n  }\n});\n```\n\n### Group Status Message\n\n```js\nawait sock.sendMessage(jid, {\n  groupStatusMessage: {\n    image: { url: './photo.jpg' },\n    caption: 'Group status update!'\n  }\n});\n```\n\n### Interactive Buttons (via interactiveButtons)\n\n```js\nawait sock.sendMessage(jid, {\n  interactiveButtons: [{\n    name: 'quick_reply',\n    buttonParamsJson: { display_text: 'Yes', id: '.yes' }\n  }],\n  text: 'Do you agree?',\n  footer: 'yelib',\n  title: 'Confirmation'\n});\n```\n\n---\n\n## Status WhatsApp\n\nSend status updates with mentions:\n\n```js\nawait sock.messageBuilders.sendStatusWhatsApp(\n  { text: 'Hello Status!', backgroundColor: '#FF5733', font: 1 },\n  ['628xxx@s.whatsapp.net']\n);\n```\n\nWith media:\n```js\nawait sock.messageBuilders.sendStatusWhatsApp(\n  { image: { url: './photo.jpg' }, caption: 'My story' },\n  ['628xxx@s.whatsapp.net', '1234567890@g.us']\n);\n```\n\n---\n\n## AI Rich Response Messages\n\nSend messages styled like Meta AI -- tables, code blocks, rich text, and links.\n\n### Table V1\n\n```js\nawait sock.sendTable(\n  jid,\n  'Language Comparison',\n  ['Feature', 'Java', 'JavaScript'],\n  [\n    ['Type', 'Compiled', 'Interpreted'],\n    ['Typing', 'Static', 'Dynamic'],\n    ['Main Use', 'Enterprise', 'Web/Full-stack']\n  ],\n  quoted,\n  { headerText: 'Comparison:', footer: 'Reference' }\n);\n```\n\n### Table V2 (Unified Response)\n\n```js\nawait sock.sendTableV2(\n  jid,\n  [\n    'Language Comparison',\n    'Feature | Java | JavaScript',\n    'Type | Compiled | Interpreted;;Typing | Static | Dynamic'\n  ],\n  quoted,\n  { headerText: 'Comparison:', text: 'See below:', footer: 'Reference' }\n);\n```\n\n### List\n\n```js\nawait sock.sendList(\n  jid,\n  'Bot Info',\n  [\n    ['Name', 'yelib'],\n    ['Version', '1.0.0'],\n    ['Based on', 'Baileys v7.0.0-rc10']\n  ],\n  quoted,\n  { footer: 'yelib' }\n);\n```\n\n### Code Block V1\n\n```js\nawait sock.sendCodeBlock(\n  jid,\n  `function hello(name) {\n  return \"Hello \" + name\n}\nhello(\"World\")`,\n  quoted,\n  { language: 'javascript', title: 'Example Code', footer: 'yelib' }\n);\n```\n\n### Code Block V2 (Unified Response)\n\nSupports syntax highlighting for JavaScript, TypeScript, Python, Go, Lua, Bash.\n\n```js\nawait sock.sendCodeBlockV2(\n  jid,\n  `package main\nimport \"fmt\"\nfunc main() {\n    fmt.Println(\"Hello, World!\")\n}`,\n  quoted,\n  { language: 'go', title: 'Go Example', text: 'A simple Go program:', footer: 'yelib' }\n);\n```\n\n### Code Highlight Types\n\n| Code | Name | Description |\n| ---- | ---- | ----------- |\n| 0 | DEFAULT | Normal text, whitespace, operators |\n| 1 | KEYWORD | Language keywords (`const`, `func`, `if`, etc.) |\n| 2 | METHOD | Function/method calls (identifier followed by `(`) |\n| 3 | STRING | String literals (`\"...\"`, `'...'`, `` `...` ``) |\n| 4 | NUMBER | Numeric values (int, float, hex, binary, octal) |\n| 5 | COMMENT | Comments (`//`, `/* */`, `#`) |\n\n### Link Message\n\n```js\nawait sock.sendLink(\n  jid,\n  'Results:\\nLink 1: {{IE_0}}click here{{/IE_0}}\\nLink 2: {{IE_1}}click here{{/IE_1}}',\n  ['https://example.com/1', 'https://example.com/2'],\n  quoted,\n  {\n    headerText: 'Search Results',\n    footer: 'yelib',\n    citations: [\n      { sourceTitle: 'Source 1', citationNumber: 1 },\n      { sourceTitle: 'Source 2', citationNumber: 2 }\n    ]\n  }\n);\n```\n\n### SubMessage Types Reference\n\n| messageType | Name | Payload Field | Description |\n| ----------- | ---- | ------------- | ----------- |\n| 0 | UNKNOWN | -- | Unknown/empty submessage |\n| 1 | GRID_IMAGE | `gridImageMetadata` | Grid layout of images |\n| 2 | TEXT | `messageText` | Plain text content |\n| 3 | INLINE_IMAGE | `imageMetadata` | Inline image with URL and alignment |\n| 4 | TABLE | `tableMetadata` | Table with rows and headings |\n| 5 | CODE | `codeMetadata` | Code block with syntax highlighting |\n| 6 | DYNAMIC | `dynamicMetadata` | Dynamic/loading content |\n| 7 | MAP | `mapMetadata` | Map with annotations |\n| 8 | LATEX | `latexMetadata` | LaTeX math expressions |\n| 9 | CONTENT_ITEMS | `contentItemsMetadata` | Content items/cards |\n\n### Rich Message (Custom Submessages)\n\n```js\nawait sock.sendRichMessage(\n  jid,\n  [\n    { messageType: 2, messageText: 'Header text' },\n    {\n      messageType: 4,\n      tableMetadata: {\n        title: 'Stats',\n        rows: [\n          { items: ['Metric', 'Value'], isHeading: true },\n          { items: ['Users', '1000'] },\n          { items: ['Uptime', '99.9%'] }\n        ]\n      }\n    },\n    {\n      messageType: 5,\n      codeMetadata: {\n        codeLanguage: 'javascript',\n        codeBlocks: [\n          { highlightType: 1, codeContent: 'const ' },\n          { highlightType: 0, codeContent: 'msg = ' },\n          { highlightType: 3, codeContent: '\"hello\"' },\n          { highlightType: 0, codeContent: ';' }\n        ]\n      }\n    },\n    { messageType: 2, messageText: 'Footer text' }\n  ],\n  quoted\n);\n```\n\n### Capture & Resend Unified Response\n\n```js\nconst captured = sock.captureUnifiedResponse(msg);\nif (captured) {\n  await sock.sendUnifiedResponse(jid, quoted, captured);\n}\n```\n\n---\n\n## Newsletter API\n\nFull newsletter management via MEX GraphQL queries and direct protocol nodes. All methods are available on the socket object.\n\n### Management\n\n**Create Newsletter:**\n```js\nconst result = await sock.newsletterCreate('My Channel', 'Channel description');\n// { id, name, creation_time, description, invite, subscribers, verification, picture, mute_state }\n```\n\n**Get Metadata:**\n```js\n// By invite code\nconst meta = await sock.newsletterMetadata('invite', 'abc123');\n// By newsletter ID\nconst meta = await sock.newsletterMetadata('id', '1234567890@newsletter');\n```\n\n**Get Subscribers Count:**\n```js\nconst count = await sock.newsletterSubscribers('1234567890@newsletter');\n```\n\n**Delete Newsletter:**\n```js\nawait sock.newsletterDelete('1234567890@newsletter');\n```\n\n### Follow / Unfollow / Mute\n\n```js\nawait sock.newsletterFollow('1234567890@newsletter');\nawait sock.newsletterUnfollow('1234567890@newsletter');\nawait sock.newsletterMute('1234567890@newsletter');\nawait sock.newsletterUnmute('1234567890@newsletter');\n```\n\n### Settings\n\n```js\nawait sock.newsletterUpdateName('1234567890@newsletter', 'New Name');\nawait sock.newsletterUpdateDescription('1234567890@newsletter', 'New description');\nawait sock.newsletterUpdatePicture('1234567890@newsletter', { url: './photo.jpg' });\nawait sock.newsletterRemovePicture('1234567890@newsletter');\n```\n\n### Messaging\n\n**Send Message:**\n```js\nawait sock.sendMessage('1234567890@newsletter', { text: 'Hello subscribers!' });\n```\n\n**React to Message:**\n```js\nawait sock.newsletterReactMessage('1234567890@newsletter', serverId, '\\u2764\\uFE0F');\nawait sock.newsletterReactMessage('1234567890@newsletter', serverId, null); // remove reaction\n```\n\n**Fetch Messages:**\n```js\nconst messages = await sock.newsletterFetchMessages('1234567890@newsletter', 10);\nconst older = await sock.newsletterFetchMessages('1234567890@newsletter', 10, sinceTimestamp);\nconst after = await sock.newsletterFetchMessages('1234567890@newsletter', 10, undefined, afterServerId);\n```\n\n**Subscribe to Live Updates:**\n```js\nconst result = await sock.subscribeNewsletterUpdates('1234567890@newsletter');\n// { duration } or null\n```\n\n### Admin\n\n```js\nconst count = await sock.newsletterAdminCount('1234567890@newsletter');\nawait sock.newsletterChangeOwner('1234567890@newsletter', '628xxx@s.whatsapp.net');\nawait sock.newsletterDemote('1234567890@newsletter', '628xxx@s.whatsapp.net');\n```\n\n### Events\n\n| Event | Payload | Description |\n|-------|---------|-------------|\n| `newsletter.reaction` | `{ id, server_id, reaction: { code, count } }` | Newsletter message reaction |\n| `newsletter.view` | `{ id, server_id, count }` | Newsletter view count |\n| `newsletter-settings.update` | `{ id, update: { name?, description? } }` | Newsletter settings changed |\n| `newsletter-participants.update` | `{ id, author, user, action, new_role }` | Admin promote/demote |\n\n---\n\n## Community API\n\n### Create Community\n\n```js\nconst community = await sock.communityCreate('My Community', { description: '...' });\n```\n\n### Create Sub-group in Community\n\n```js\nconst group = await sock.communityCreateGroup(communityId, 'Sub Group');\n```\n\n### Link / Unlink Sub-group\n\n```js\nawait sock.communityLinkSubGroup(communityId, subgroupJid);\nawait sock.communityUnlinkSubGroup(communityId, subgroupJid);\n```\n\n### Leave Community\n\n```js\nawait sock.communityLeave(communityId);\n```\n\n### Membership Approval\n\n```js\nawait sock.communityAcceptRequest(communityId, requesterJid);\nawait sock.communityRejectRequest(communityId, requesterJid);\n```\n\n### Invite Codes\n\n```js\nconst code = await sock.communityInviteCode(communityId);\nawait sock.communityRevokeInviteCode(communityId);\n```\n\n---\n\n## Socket Architecture\n\nEach socket layer extends the previous via composition:\n\n```\nmakeSocket -> WebSocket + Noise protocol + pre-key management\n  makeChatsSocket -> App state sync + chat modifications + profile\n    makeGroupsSocket -> Group CRUD + participant management\n      makeNewsletterSocket -> Newsletter follow/unfollow/metadata\n        makeMessagesSendSocket -> Message sending + relay + MessageBuilders\n          makeMessagesRecvSocket -> Message receiving + decryption + retry\n            makeBusinessSocket -> Product catalog + business profile\n              makeCommunitiesSocket -> Community CRUD + sub-groups\n                makeWASocket <- Top-level export\n```\n\n---\n\n## Differences from Official Baileys\n\nFeature comparison between **yelib (miuujs/baileys)** and **Official Baileys ([@whiskeysockets/baileys](https://github.com/WhiskeySockets/Baileys) v7)**.\n\nAll features below were verified from the source code.\n\n| # | Feature | Official | yelib | Source Reference |\n|---|---------|:-------:|:-----:|------------------|\n| 1 | Text / Image / Video / Audio / Sticker / Document | Yes | Yes | Standard message types |\n| 2 | Location / Contact / Reaction / Poll | Yes | Yes | Standard message types |\n| 3 | Edit / Delete / Forward Message | Yes | Yes | Standard message types |\n| 4 | Group CRUD + Participant Management | Yes | Yes | `Socket/groups.js` |\n| 5 | Community CRUD + Sub-groups | Yes | Yes | `Socket/communities.js` |\n| 6 | Newsletter Follow / Unfollow / Metadata | Yes | Yes | `Socket/newsletter.js` |\n| 7 | Business Profile & Product Catalog | Yes | Yes | `Socket/business.js` |\n| 8 | App State Sync + Chat Modifications | Yes | Yes | `Socket/chats.js` |\n| 9 | WebSocket + Noise Protocol + Pre-key | Yes | Yes | `Socket/socket.js` |\n| 10 | Native Flow Buttons (interactiveMessage) | No | Yes | `Socket/messages-send.js:1155` |\n| 11 | List Menu (single_select) | No | Yes | `Socket/messages-send.js:1155` |\n| 12 | Carousel Message | No | Yes | `Socket/messages-send.js:1155` |\n| 13 | Album Message (multi media) | No | Yes | `Utils/messages.js:465-470` |\n| 14 | AI Rich Response -- Table V1 / V2 | No | Yes | `Utils/rich-messages.js:158-227` |\n| 15 | AI Rich Response -- Code Block V1 / V2 | No | Yes | `Utils/rich-messages.js:180-244` |\n| 16 | AI Rich Response -- Link Message | No | Yes | `Utils/rich-messages.js:246-300` |\n| 17 | AI Rich Response -- List Info | No | Yes | `Utils/rich-messages.js:169-178` |\n| 18 | AI Rich Response -- Rich Message (Custom Submessages) | No | Yes | `Utils/rich-messages.js:190-193` |\n| 19 | Latex Rendering (RichSubMessageType) | No | Yes | `Utils/rich-messages.js:35` |\n| 20 | Event Message + Encrypted Response | No | Yes | `Utils/messages.js:410-429`, `Utils/process-message.js:362-408` |\n| 21 | Poll Result Message | No | Yes | `Socket/message-builders.js` |\n| 22 | Poll Creation V3 (single-select) | No | Yes | `Utils/messages.js:455-462` |\n| 23 | Product Message (viewOnce + interactive) | No | Yes | `Socket/message-builders.js` |\n| 24 | Payment Request | No | Yes | `Socket/message-builders.js` |\n| 25 | Group Status Message / V2 | No | Yes | `Utils/messages.js:657-658`, `Socket/message-builders.js` |\n| 26 | Status Mentions (proto field) | No | Yes | `WAProto/WAProto.proto:5222` |\n| 27 | Button Features (limited time offer, bottom sheet, tap target) | No | Yes | `Socket/messages-send.js:16-22` |\n| 28 | Business Metadata Nodes for Buttons (ported from ourin-baileys) | No | Yes | `WABinary/generic-utils.js:137-190`, `Socket/messages-send.js:24-35,944-948` |\n| 29 | Capture & Resend Unified Response | No | Yes | `Utils/rich-messages.js:302-313` |\n| 30 | Forwarded AI Bot Info (Meta AI style) | No | Yes | `Utils/rich-messages.js:142-150` |\n| 31 | Full LID <-> PN Mapping System | No | Yes | `Signal/lid-mapping.js`, `WAUSync/Protocols/UsyncLIDProtocol.js` |\n| 32 | LID Session Migration | No | Yes | `Signal/libsignal.js:237-351` |\n| 33 | LID/PN Dual Addressing | No | Yes | `Utils/decode-wa-message.js:60-78` |\n| 34 | MessageRetryManager (base key collision detection) | No | Yes | `Utils/message-retry-manager.js` |\n| 35 | Newsletter Create + Delete via MEX GraphQL | No | Yes | `Socket/newsletter.js`, `Socket/mex.js` |\n| 36 | Newsletter Admin (Change Owner, Demote, Admin Count) | No | Yes | `Socket/newsletter.js` |\n| 37 | Newsletter Settings (Name, Description, Picture, Mute) | No | Yes | `Socket/newsletter.js` |\n| 38 | Newsletter React + Fetch Messages | No | Yes | `Socket/newsletter.js:106` |\n| 39 | Newsletter Live Updates Subscription | No | Yes | `Socket/newsletter.js:151` |\n| 40 | Newsletter Subscribers Count | No | Yes | `Socket/newsletter.js:65` |\n| 41 | **Newsletter Media (Image/Video/Audio)** | No | **Yes** | `Utils/messages-media.js:648`, `Utils/messages.js:132-181`, `Socket/messages-send.js:647-649` |\n| 42 | Group Member Labeling | No | Yes | `Socket/messages-send.js:135-156` |\n| 43 | On-demand History Sync | No | Yes | `Socket/messages-recv.js:47-64` |\n| 44 | Media Re-upload (updateMediaMessage) | No | Yes | `Socket/messages-send.js:1104-1150` |\n| 45 | Peer Data Operation Messages | No | Yes | `Socket/messages-send.js:374-402` |\n| 46 | Reporting Token System | No | Yes | `Utils/reporting-utils.js` |\n| 47 | TC Token System (Trusted Contact) | No | Yes | `Utils/tc-token-utils.js` |\n| 48 | Privacy Token Handling | No | Yes | `Socket/messages-recv.js:1084-1104` |\n| 49 | Reachout Timelock Enforcement | No | Yes | `Types/State.js:10-29`, `Socket/messages-recv.js:175-211` |\n| 50 | Message Capping System | No | Yes | `Socket/messages-recv.js:213-223` |\n| 51 | Identity Change Handler | No | Yes | `Utils/identity-change-handler.js` |\n| 52 | WAM Analytics/Metrics Encoding | No | Yes | `WAM/` (BinaryInfo, encode, constants) |\n| 53 | Bot Profile USync Protocol | No | Yes | `WAUSync/Protocols/UsyncBotProfileProtocol.js` |\n| 54 | Status WhatsApp with Mentions | No | Yes | `Socket/message-builders.js` |\n| 55 | MessageBuilders System (auto type routing) | No | Yes | `Socket/message-builders.js` |\n\n> [!IMPORTANT]\n> Official Baileys refers to the original [@whiskeysockets/baileys](https://github.com/WhiskeySockets/Baileys) v7.\n> yelib (miuujs/baileys) is a fork that extends the original with 40+ additional features including interactive messages, album messages, AI rich response system, full LID mapping, event messages, payment support, newsletter GraphQL API, retry manager, MessageBuilders system, business metadata nodes for buttons (ported from ourin-baileys), and various security/privacy systems. All features listed above are verified from the source code.\n>\n> **Newsletter Media Fix:** Image, video, and audio messages to newsletters now work correctly. Media uploads use the proper WhatsApp newsletter path (`/newsletter/newsletter-` instead of `/mms/`), include required mediatype attributes in the protocol node, and generate necessary metadata (thumbnails, duration, waveforms). Edit/delete operations on newsletters also use the correct edit values.\n\n---\n","readmeFilename":"README.md"}