{"_id":"r-baileys","name":"r-baileys","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"r-baileys","version":"1.0.0","description":"R-Baileys WhatsApp Modified By Kristian","keywords":["whatsapp","whatsapp-baileys","baileys","whatsapp-bot","interactive-messages","whatsapp-web","javascript","typescript"],"homepage":"https://github.com/KriszzTzy/R-Baileys","repository":{"url":"git+https://github.com/KriszzTzy/R-Baileys.git"},"license":"MIT","author":{"name":"Kristian."},"main":"lib/index.js","types":"lib/index.d.ts","scripts":{"build:all":"tsc && typedoc","build:docs":"typedoc","build:tsc":"tsc","changelog:last":"conventional-changelog -p angular -r 2","changelog:preview":"conventional-changelog -p angular -u","gen:protobuf":"sh WAProto/GenerateStatics.sh","lint":"eslint src --ext .js,.ts,.jsx,.tsx","lint:fix":"eslint src --fix --ext .js,.ts,.jsx,.tsx","prepack":"","prepare":"","preinstall":"node ./engine-requirements.js","release":"release-it","test":"jest"},"dependencies":{"@adiwajshing/keyed-db":"^0.2.4","@hapi/boom":"^9.1.3","@cacheable/node-cache":"^1.4.0","async-mutex":"^0.5.0","audio-decode":"^2.1.3","axios":"^1.3.3","cache-manager":"4.0.1","chalk":"^4.1.2","futoin-hkdf":"^1.5.1","libphonenumber-js":"^1.10.20","lodash":"^4.17.21","libsignal":"github:tenka-san/libsignal-node","music-metadata":"^7.12.3","node-cache":"^5.1.2","node-fetch":"^2.6.1","pino":"^7.0.0","protobufjs":"^7.2.4","uuid":"^9.0.0","ws":"^8.13.0"},"devDependencies":{"@adiwajshing/eslint-config":"github:adiwajshing/eslint-config","@types/got":"^9.6.11","@types/jest":"^27.5.1","@types/node":"^16.0.0","@types/ws":"^8.0.0","conventional-changelog-cli":"^2.2.2","eslint":"^8.0.0","jest":"^27.0.6","jimp":"^0.16.1","link-preview-js":"^3.0.0","open":"^8.4.2","qrcode-terminal":"^0.12.0","release-it":"^15.10.3","ts-jest":"^27.0.3","ts-node":"^10.8.1","typedoc":"^0.24.7","typescript":"^4.6.4","json":"^11.0.0"},"peerDependencies":{"jimp":"^0.16.1","link-preview-js":"^3.0.0","qrcode-terminal":"^0.12.0"},"peerDependenciesMeta":{"jimp":{"optional":true},"link-preview-js":{"optional":true},"qrcode-terminal":{"optional":true}},"packageManager":"yarn@1.22.19","engines":{"node":">=20.0.0"},"exports":{".":{"require":"./lib/index.js","import":"./lib/index.mjs","default":"./lib/index.js"}},"_id":"r-baileys@1.0.0","bugs":{"url":"https://github.com/KriszzTzy/R-Baileys/issues"},"_nodeVersion":"20.20.2","_npmVersion":"11.16.0","dist":{"integrity":"sha512-OLmsSMrPrQnDhIr2SuDen7LBPHTDWx3vin4bpjVSmkaQDsjcwvp/T7hr9kibj80gCOpFIEDohbEm+SXafdDVWw==","shasum":"0b6d3f0dce8653a2bff668dc48770c08ae5080b5","tarball":"https://registry.npmjs.org/r-baileys/-/r-baileys-1.0.0.tgz","fileCount":202,"unpackedSize":4175366,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDWkQNqpBPVQAVaCf5Fi/2aIPyYJdZM7qAJvXBrCQKa+AiEAn5O+rPTzjA6wDzxjyILo6p5Zdrauni4VB6CvFbX37NU="}]},"_npmUser":{"name":"kriszztzy","email":"kriszztzyofficial@gmail.com"},"directories":{},"maintainers":[{"name":"kriszztzy","email":"kriszztzyofficial@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/r-baileys_1.0.0_1780889085419_0.7119946627973615"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-08T03:24:45.249Z","1.0.0":"2026-06-08T03:24:45.618Z","modified":"2026-06-08T03:24:45.880Z"},"maintainers":[{"name":"kriszztzy","email":"kriszztzyofficial@gmail.com"}],"description":"R-Baileys WhatsApp Modified By Kristian","homepage":"https://github.com/KriszzTzy/R-Baileys","keywords":["whatsapp","whatsapp-baileys","baileys","whatsapp-bot","interactive-messages","whatsapp-web","javascript","typescript"],"repository":{"url":"git+https://github.com/KriszzTzy/R-Baileys.git"},"author":{"name":"Kristian."},"bugs":{"url":"https://github.com/KriszzTzy/R-Baileys/issues"},"license":"MIT","readme":"<img src=\"https://user-images.githubusercontent.com/74038190/212284100-561aa473-3905-4a80-b561-0d28506553ee.gif\" width=\"100%\">\n\n<p align=\"center\">\n  Reze-Baileys A simple and powerful WebSocket library for WhatsApp automation.<br/>\n  Fast, stable, and easy to use for real-time bots.\n</p>\n\n  <img src=\"https://raw.githubusercontent.com/KriszzTzy/Database/main/1/467c69c8-cc17-403d-a0d8-5b732d293a03.jpeg\" width=\"550\" alt=\"R-Baileys Banner\" style=\"border-radius: 25px; border: 5px solid #ff0000;\" />\n  <br><br>\n  \n<p align=\"center\">\n  <a href=\"https://krizx.my.id\">\n    <img src=\"https://img.shields.io/badge/Website-Official-0A0A0A?style=for-the-badge&logo=google-chrome&logoColor=white\"/>\n  </a>\n  <a href=\"https://github.com/KriszzTzy/Reze-WABot\">\n    <img src=\"https://img.shields.io/badge/GitHub-Repository-0A0A0A?style=for-the-badge&logo=github&logoColor=white\"/>\n  </a>\n  <a href=\"https://whatsapp.com/channel/0029VbCMM4VLikgFv0JplT2D\">\n    <img src=\"https://img.shields.io/badge/WhatsApp-Channel-0A0A0A?style=for-the-badge&logo=whatsapp&logoColor=white\"/>\n  </a>\n</p>\n\n---\n\n<p align=\"center\">\n  <strong>Optimized for WhatsApp Bot APIs</strong><br/>\n  <sub>Powered by the ideas behind Reze WABot (Beta)</sub>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://github.com/KriszzTzy/Reze-WABot\">\n    <img src=\"https://img.shields.io/badge/WhatsApp%20Bot%20Beta-111111?style=for-the-badge&logo=github&logoColor=white\"/>\n  </a>\n</p>\n\n---\n\n## Overview\n\n**Reze-Baileys — Sockets** is a modern WebSocket library for building WhatsApp bots and automation systems.  \nIt focuses on performance, simplicity, and a clean developer experience — without unnecessary overhead.\n\nNo Selenium. No Chromium. Just a fast, lightweight connection built for real-time messaging.\n\n---\n\n## ✦ Why using Reze-Baileys??\n\n- ⚡ **Fast by design** — optimized for real-time performance  \n- 🧩 **Simple to use** — clean API, easy integration  \n- 🪶 **Lightweight** — no heavy dependencies  \n- 🔐 **Modern authentication** — secure pairing code (no QR)  \n- 🎯 **Production ready** — stable and reliable  \n- 🤖 **AI-ready** — supports WhatsApp `AI ✦` message badge  \n- 🔘 **Button support** — native flow buttons, lists, CTAs, carousel  \n\n---\n\n## ✦ Features\n\n- Multi-device support  \n- Pairing code login (no QR scan required) \n- Pure JavaScript and TypeScript\n- Actively maintained by **Kristian**\n- **Interactive buttons** (reply, URL, copy, call, list, etc..)\n- **Carousel messages** with image cards and per-card buttons\n- **AI Rich Message** messages with ai response \n\n---\n\n## Installation & Setup\n\n### Via `package.json`\n\nEdit your package.js file\n\n```json\n\"dependencies\": {\n    \"baileys\": \"github:KriszzTzy/R-Baileys\"\n}\n```\n\n> Requires Node.js **>= 20.0.0**\n\n---\n\n## 📚 Index\n\n- 🔗 [Connecting Account](#connecting-account)\n  - 🔑 [Connect with Pairing Code](#connect-with-pairing-code)\n  - 📷 [Connect with QR Code](#connect-with-qr-code)\n- 📤 [Sending Messages](#sending-messages)\n  - 💬 [Default Messages](#default-messages)\n  - 🔘 [Interactive Buttons](#interactive-buttons)\n  - 🤖 [AIRich Response](#airich-response)\n\n---\n\n## Connecting Account\n\n### Connect with Pairing Code\n\n```js\nimport makeWASocket, { useMultiFileAuthState, DisconnectReason } from 'baileys'\nimport { Boom } from '@hapi/boom'\n\nconst { state, saveCreds } = await useMultiFileAuthState('./session')\n\nconst sock = makeWASocket({ auth: state })\n\nsock.ev.on('creds.update', saveCreds)\n\nconst code = await sock.requestPairingCode('628XXX')\n//Or Custom your code:\n//const code = await sock.requestPairingCode('628XXX', 'YOUR1234)\nconsole.log('Pairing code:', code)\n\nsock.ev.on('connection.update', ({ connection, lastDisconnect }) => {\n    if (connection === 'close') {\n        const shouldReconnect =\n            (lastDisconnect?.error instanceof Boom)\n                ? lastDisconnect.error.output.statusCode !== DisconnectReason.loggedOut\n                : true\n        if (shouldReconnect) { /* reconnect */ }\n    } else if (connection === 'open') {\n        console.log('Connected to WhatsApp!')\n    }\n})\n```\n\n### Connect with QR Code\n\n```js\nimport makeWASocket, { useMultiFileAuthState } from 'baileys'\nimport qrcode from 'qrcode-terminal'\n\nconst { state, saveCreds } = await useMultiFileAuthState('./session')\nconst sock = makeWASocket({ auth: state })\n\nsock.ev.on('connection.update', ({ qr }) => {\n    if (qr) qrcode.generate(qr, { small: true })\n})\n\nsock.ev.on('creds.update', saveCreds)\n```\n\n## Sending Messages\n\n### Default Messages\nSend Messages Using Text, Photos, and Videos.\n\n<details>\n<summary><strong>Example Code</strong></summary>\n\n```js\n// Text Messages\nawait sock.sendMessage(jid, {\n    text: \"Hi, I'm using the R-Baileys library!\"\n}, { quoted: m })\n\n// Image Messages\nawait sock.sendMessage(jid, {\n    caption: \"Hi, I'm using the R-Baileys library!\"\n    image: fs.readFileSync('./path/file.jpg') // Url Or Path \n}, { quoted: m })\n\n// Video Messages\nawait sock.sendMessage(jid, {\n    caption: \"Hi, I'm using the R-Baileys library!\",\n    video: { url: 'https://example.com' } // Url Or Path\n}, { quoted: m })\n```\n</details>\n\n---\n\n## Interactive Buttons\n\n### Interactive Messages\nCreate interactive messages with button options and quick replies.\n\n<details>\n<summary><strong>Example Code</strong></summary>\n\n```js\n// Button Reply\nawait sock.sendMessage(jid, {\n    interactiveMessage: {\n        text: \"Select the available menu:\",\n        footer: \"Click one of the buttons below\",\n        buttons: [\n            { type: 'reply', text: '📦 Check Order', id: 'check_order' },\n            { type: 'reply', text: '💰 Promo', id: 'promo' },\n            { type: 'reply', text: '🎯 Help', id: 'help' }\n        ]\n    }\n}, { quoted: m })\n\n// Button Copy\nawait sock.sendMessage(jid, {\n    interactiveMessage: {\n        text: \"Your voucher code:\",\n        footer: \"Click the button to copy\",\n        buttons: [\n            { type: 'copy', text: '📋 DISCOUNT50', copy_code: 'DISCOUNT50', id: 'copy_voucher' }\n        ]\n    }\n}, { quoted: m })\n\n// Button URL\nawait sock.sendMessage(jid, {\n    interactiveMessage: {\n        text: \"Visit our website:\",\n        footer: \"Click to open link\",\n        buttons: [\n            { type: 'url', text: '🌐 Website', url: 'https://example.com' },\n            { type: 'url', text: '📱 Instagram', url: 'https://instagram.com/example', webview: true }\n        ]\n    }\n}, { quoted: m })\n\n// Button Selection\nawait sock.sendMessage(jid, {\n    interactiveMessage: {\n        text: \"Select product category:\",\n        footer: \"Choose one from the list\",\n        buttons: [\n            {\n                type: 'selection',\n                title: '📱 Product Categories',\n                //Optional Icon\n                icon: 'default', //default, document, promotion, review\n                sections: [\n                    {\n                        title: \"Electronics\",\n                        rows: [\n                            { title: \"Smartphone\", description: \"Latest 2024 phones\", id: \"phone\" },\n                            { title: \"Laptop\", description: \"For work and gaming\", id: \"laptop\" }\n                        ]\n                    },\n                    {\n                        title: \"Fashion\",\n                        rows: [\n                            { title: \"Clothes\", description: \"Latest models\", id: \"clothes\" },\n                            { title: \"Shoes\", description: \"Original\", id: \"shoes\" }\n                        ]\n                    }\n                ]\n            }\n        ]\n    }\n}, { quoted: m })\n\n// Button Catalog Greeting \n// Noted: This button does not work if there is only 1 button, maximum 2.\n// Here is an example with the Url button.\nawait sock.sendMessage(jid, {\n    interactiveMessage: {\n    text: \"Check out our latest product!\",\n    footer: \"Follow my Channel Or Click the button for details\",\n    buttons: [        \n        { \n          type: 'url', text: 'WhatsApp Channel', url: \"https://whatsapp.com/channel/0029VbCMM4VLikgFv0JplT2D\"\n        },\n        {\n        // catalog_greeting or cta_catalog\n        type: 'catalog_greeting',\n            business_phone_number: '123456789',\n            catalog_product_id: '123456789' }\n    ]\n}\n}, { quoted: m })\n\n// Button Example With Media\nawait sock.sendMessage(jid, {\n    interactiveMessage: {\n        text: \"Check out our latest product!\",\n        footer: \"Click the button for details\",\n        image: \"https://example.com/promo-banner.jpg\",\n        buttons: [\n            { type: 'reply', text: '🛒 Buy Now', id: 'buy_now' },\n            { type: 'url', text: '🔍 View Details', url: 'https://example.com/product' }\n        ]\n    }\n}, { quoted: m })\n```\n</details>\n\n---\n\n## AIRich Response\n\n### Rich Message\nCreate rich msg, AI-powered multimedia messages with code, tables, images, videos, products, and smart suggestions.\n\n<details>\n<summary><strong>Example Code</strong></summary>\n\n```js\n// Text\nawait sock.sendMessage(jid, {\n    richMessage: {\n        title: \"🤖 AI Assistant\",\n        text: \"Hello! How can I help you?\\nI'm a virtual assistant ready to help you anytime.\",\n        suggestions: [\n            \"Check today's weather\",\n            \"Latest news\"\n        ]\n    }\n}, { quoted: m });\n\n// Code Blocks \nawait sock.sendMessage(jid, {\n    richMessage: {\n        title: \"💻 JavaScript Code Example\",\n        text: \"Here's a function to calculate Fibonacci:\",\n        code: {\n            language: \"javascript\",\n            content: `function fibonacci(n) {\n    if (n <= 1) return n;\n    return fibonacci(n - 1) + fibonacci(n - 2);\n}\n\n// Usage example\nconsole.log(fibonacci(10)); // Output: 55`\n        },\n        footer: \"Use this code wisely\",\n        suggestions: [\"Explain the code\", \"Optimize code\"]\n    }\n}, { quoted: m });\n\n// Table Message\nawait sock.sendMessage(jid, {\n    richMessage: {\n        title: \"📊 Employee Data\",\n        text: \"Here are this month's best employees:\",\n        table: [\n            [\"Name\", \"Position\", \"Salary\", \"Bonus\"],\n            [\"John Doe\", \"Senior Developer\", \"$15,000\", \"$2,000\"],\n            [\"Jane Smith\", \"UI/UX Designer\", \"$12,000\", \"$1,500\"],\n            [\"Mike Johnson\", \"Project Manager\", \"$18,000\", \"$3,000\"]\n        ],\n        footer: \"Data as of December 2024\",\n        suggestions: [\"View details\", \"Export to Excel\"]\n    }\n}, { quoted: m });\n\n// Hyperlink Message\nawait sock.sendMessage(jid, {\n    richMessage: {\n        title: \"🔗 Important Links\",\n        body: \"Here are some useful links:\",\n        text: \"Visit [](https://google.com) to search for information, or [GitHub](https://github.com) for programming code.\\n\\nRead the documentation [here](https://example.com/docs) for a complete guide.\",\n        suggestions: [\"Open Google\", \"Open GitHub\", \"View Docs\"]\n    }\n}, { quoted: m });\n\n// Hyperlink with Sources\nawait sock.sendMessage(jid, {\n    richMessage: {\n        title: \"📰 AI Search Results\",\n        body: \"Based on trusted sources:\",\n        text: \"According to recent research, [climate change](https://ipcc.ch) significantly impacts marine ecosystems. [Read more](https://nature.com/climate-change)\",\n        sources: [\n            [\"https://ipcc.ch/favicon.ico\", \"https://ipcc.ch/report\", \"IPCC Report 2024\"],\n            [\"https://nature.com/favicon.ico\", \"https://nature.com/climate\", \"Nature Climate Change\"]\n        ],\n        footer: \"Verified sources\",\n        suggestions: [\"Show data charts\", \"Compare with last year\"]\n    }\n}, { quoted: m });\n\n// Posts Message\nawait sock.sendMessage(jid, {\n    richMessage: {\n        title: \"📱 Our Social Media\",\n        body: \"Latest posts from our social media:\",\n        text: \"Follow us for daily updates and promotions!\",\n        posts: [\n            {\n                title: \"Instagram\",\n                username: \"@ourcompany\",\n                profile_url: \"https://instagram.com/favicon.ico\",\n                profile_picture_url: \"https://f.krizx.my.id/1.jpg\",\n                thumbnail_url: \"https://f.krizx.my.id/2.jpg\",\n                post_caption: \"Check out our new collection! 🔥\",\n            \tdeeplink: 'https://instagram.com/p/xxxxx',\n                source_app: \"INSTAGRAM\",\n                is_verified: true\n            },\n            {\n                title: \"Facebook\",\n                username: \"@ourcompany\",\n                profile_url: \"https://facebook.com/favicon.ico\", \n                profile_picture_url: \"https://f.krizx.my.id/1.jpg\",\n                thumbnail_url: \"https://f.krizx.my.id/2.jpg\",\n                post_caption: \"Big announcement coming soon! 🎉\",\n            \tdeeplink: 'https://facebook.com/xxxxx',\n                source_app: \"FACEBOOK\",\n                is_verified: true\n            },\n            {\n                title: \"Threads\",\n                username: \"@ourcompany\",\n                profile_url: \"https://threads.net/favicon.ico\",\n                profile_picture_url: \"https://f.krizx.my.id/1.jpg\",\n                thumbnail_url: \"https://f.krizx.my.id/2.jpg\",\n                post_caption: \"What's on your mind today? 💭\",\n            \tdeeplink: 'https://threads.net/@ourcompany/post/xxxxx',\n                source_app: \"THREADS\",\n                is_verified: false\n            }\n        ],\n        suggestions: [\"Follow Instagram\", \"Like Facebook\", \"Join Threads\"]\n    }\n}, { quoted: m });\n\n// Products Message\nawait sock.sendMessage(jid, {\n    richMessage: {\n        title: \"🛍️ Product Recommendations\",\n        body: \"Based on your search history:\",\n        products: [\n            {\n                title: \"RGB Gaming Headset\",\n                brand: \"AudioTech\",\n                price: \"$49.99\",\n                sale_price: \"$39.99\",\n                image: \"https://f.krizx.my.id/1.jpg\",\n                url: \"https://shop.com/product/headset123\"\n            },\n            {\n                title: \"Wireless Mouse\",\n                brand: \"LogiTech\",\n                price: \"$35.00\",\n                image: \"https://f.krizx.my.id/1.jpg\",\n                url: \"https://shop.com/product/mouse456\"\n            },\n            {\n                title: \"Mechanical Keyboard\",\n                brand: \"Keychron\",\n                price: \"$120.00\",\n                sale_price: \"$99.99\",\n                image: \"https://f.krizx.my.id/1.jpg\",\n                url: \"https://shop.com/product/keyboard789\"\n            }\n        ],\n        footer: \"Click product to buy\",\n        suggestions: [\"View all products\", \"Filter by price\", \"Sort by bestseller\"]\n    }\n}, { quoted: m });\n```\n</details>\n\n---\n\n## 🌐 Links\n\n<p align=\"center\">\n<a href=\"https://krizx.my.id\">\n  <img src=\"https://img.shields.io/badge/Website-Official-black?style=for-the-badge&logo=google-chrome&logoColor=white\"/>\n</a>\n<a href=\"https://whatsapp.com/channel/0029VbCMM4VLikgFv0JplT2D\">\n  <img src=\"https://img.shields.io/badge/WhatsApp-Channel-25D366?style=for-the-badge&logo=whatsapp&logoColor=white\"/>\n</a>\n<a href=\"https://github.com/KriszzTzy/Reze-WABot\">\n  <img src=\"https://img.shields.io/badge/GitHub-Repository-181717?style=for-the-badge&logo=github&logoColor=white\"/>\n</a>\n</p>\n\n---\n\n### 🐞 Found a Bug?\n\nIf you encounter a bug or issue while using this project, please do one of the following:\n\n- **Email Community** via official Gmail (kriszztzyofficial@gmail.com)\n- **Contact the maintainer directly** via WhatsApp\n\n<p align=\"center\">\n  <a href=\"https://wa.me/message/HHFFLIFTDNWDF1\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img\n      alt=\"Chat on WhatsApp\"\n      src=\"https://img.shields.io/badge/Chat%20on%20WhatsApp-25D366?style=for-the-badge&logo=whatsapp&logoColor=white\"\n    />\n  </a>\n</p>\n<details>\n<summary>🙏 <strong>TQTO (Thanks To)</strong></summary>\n\nThank you to all parties who have provided support, inspiration, and contributions—both directly and indirectly—in the development of this project:\n\n- **Allah SWT** — for all His mercy, ease and protection.\n- **Parents** — for your endless love, prayers and support.\n- **[Nstar-Y / Nstar-bail](https://github.com/nstar-y/bail)** — as an initial foundation and reference in the development of this system.\n- **[Kriszz Hayanasi](https://github.com/KriszzTzy)** (Me)\nThe main developer of this project.\n\n</details>\n\n> [!WARNING]\n> This PROJECT is built on top of the WhiskeySockets/Baileys project. All the original core logic is their own. R-Baileys extends it with thoughtful UX and DX improvements.\n\n---\n\n### 🙌 Contributors outside of Baileys code\n\nThanks to the following great contributors who helped improve this project 💖\n\n<table>\n  <tr>\n    <td align=\"center\">\n      <a href=\"https://github.com/KriszzTzy\">\n        <img src=\"https://avatars.githubusercontent.com/u/194907727?v=4\" width=\"80px;\" style=\"border-radius:50%;\" alt=\"Dev\"/>\n        <br />\n        <sub><b>Kriszz</b></sub>\n      </a>\n    </td>\n  </tr>\n</table>\n\n<img src=\"https://user-images.githubusercontent.com/74038190/212284100-561aa473-3905-4a80-b561-0d28506553ee.gif\" width=\"100%\" style=\"transform: rotate(180deg);\">\n","readmeFilename":"README.md","_rev":"1-3790c1adcc6e9043bdf7cdb678be2133"}