{"_id":"@sanndestroyer/baileys","name":"@sanndestroyer/baileys","dist-tags":{"latest":"2.0.3"},"versions":{"2.0.3":{"name":"@sanndestroyer/baileys","version":"2.0.3","description":"WhatsApp API Modification By K","publishConfig":{"access":"public"},"keywords":["whatsapp","baileys","whatsapp-web","whatsapp-chat","whatsapp-group","botwa","shenira6core"],"homepage":"https://github.com/whiskeysockets/baileys","profile":{"baseurl":"https://shenirapi.shenira9x.me"},"license":"MIT","author":{"name":"Adhiraj Singh"},"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":"npm:@sanndestroyer/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/sharp":"^0.29.4","@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","sharp":"^0.30.5","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","sharp":"^0.32.2"},"peerDependenciesMeta":{"jimp":{"optional":true},"link-preview-js":{"optional":true},"qrcode-terminal":{"optional":true},"sharp":{"optional":true}},"packageManager":"yarn@1.22.19","engines":{"node":">=20.0.0"},"_id":"@sanndestroyer/baileys@2.0.3","gitHead":"d3c9378c005aabdc330539b902a0a26fc26fc1ae","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-1Fc0AojNCxOtZKdwSLSVLJR76MrlvTHUExeHpXfctrioZ5DL4y8z4VJJIW+ZPpfbQRvyzQTcLT1G7f6cFwaC5g==","shasum":"83ee75da4c42c318a43bac9f899616bbe7ddfc99","tarball":"https://registry.npmjs.org/@sanndestroyer/baileys/-/baileys-2.0.3.tgz","fileCount":104,"unpackedSize":9641339,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDJnTlLPfD8hRIKN9LmwYxOetJB2yP1AD/FNIeGUGR7bAIhAKTAp4Ucrjsuyh6zE9B3JoGYwbCfyce4oqkU0AWQHzf5"}]},"_npmUser":{"name":"sanndestroyer","email":"longwhei@gmail.com"},"directories":{},"maintainers":[{"name":"sanndestroyer","email":"longwhei@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/baileys_2.0.3_1776512795248_0.6332223329959812"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-18T11:46:35.112Z","2.0.3":"2026-04-18T11:46:35.425Z","modified":"2026-04-18T11:46:35.642Z"},"maintainers":[{"name":"sanndestroyer","email":"longwhei@gmail.com"}],"description":"WhatsApp API Modification By K","homepage":"https://github.com/whiskeysockets/baileys","keywords":["whatsapp","baileys","whatsapp-web","whatsapp-chat","whatsapp-group","botwa","shenira6core"],"author":{"name":"Adhiraj Singh"},"license":"MIT","readme":"# WhatsApp Baileys\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/z4phdev/client/refs/heads/main/thumbnail.png\" alt=\"Thumbnail\" />\n</p>\n\nWhatsApp Baileys is an open-source library designed to help developers build automation solutions and integrations with WhatsApp efficiently and directly. Using websocket technology without the need for a browser, this library supports a wide range of features such as message management, chat handling, group administration, as well as interactive messages and action buttons for a more dynamic user experience.\n\nActively developed and maintained, baileys continuously receives updates to enhance stability and performance. One of the main focuses is to improve the pairing and authentication processes to be more stable and secure. Pairing features can be customized with your own codes, making the process more reliable and less prone to interruptions.\n\nThis library is highly suitable for building business bots, chat automation systems, customer service solutions, and various other communication automation applications that require high stability and comprehensive features. With a lightweight and modular design, baileys is easy to integrate into different systems and platforms.\n\n---\n\n### Main Features and Advantages\n\n- Supports automatic and custom pairing processes\n- Fixes previous pairing issues that often caused failures or disconnections\n- Supports interactive messages, action buttons, and dynamic menus\n- Efficient automatic session management for reliable operation\n- Compatible with the latest multi-device features from WhatsApp\n- Lightweight, stable, and easy to integrate into various systems\n- Suitable for developing bots, automation, and complete communication solutions\n- Comprehensive documentation and example codes to facilitate development\n\n---\n\n## Getting Started\n\nBegin by installing the library via your preferred package manager, then follow the provided configuration guide. You can also utilize the ready-made example codes to understand how the features work. Use session storage and interactive messaging features to build complete, stable solutions tailored to your business or project needs.\n\n---\n\n## Add Function ( Simple code )\n\n### Label Group\nTag/Label Member Grop\n\n```javascript\nawait sock.setLabelGroup(jid, string)\n```\n---\n### Check ID Channel \nGet ID Channel From Url\n\n```javascript\nawait sock.newsletterFromUrl(url)\n```\nResult JSON\n```json\n{\n  \"name\": \"Name Channel\",\n  \"id\": \"Channel ID\",\n  \"state\": \"Status Channel\",\n  \"subscribers\": \"Followers\",\n  \"verification\": \"UNVERIFIED\",\n  \"creation_time\": 1728547155,\n  \"description\": \"Description Channel\"\n}\n```\n---\n### Check banned number\nYou can see the status of blocked numbers here \n\n```javascript\nsock.checkWhatsApp(jid)\n```\n---\n\n## SendMessage Documentation\n\n### Status Mention Group & Private Message\nSend Status Mention Group/Private Chat\n\n```javascript\nawait sock.sendStatusMention(content, jid);\n```\n\n### Status Group Message V2\nSend Group Status With Version 2 \n\n```javascript\nawait sock.sendMessage(jid, {\n     groupStatusMessage: {\n          text: \"Hello World\"\n     }\n});\n```\n\n### Album Message (Multiple Images)\nSend multiple images in a single album message:\n\n```javascript\nawait sock.sendMessage(jid, { \n    albumMessage: [\n        { image: cihuy, caption: \"Foto pertama\" },\n        { image: { url: \"URL IMAGE\" }, caption: \"Foto kedua\" }\n    ] \n}, { quoted: m });\n```\n\n### Event Message\nCreate and send WhatsApp event invitations:\n\n```javascript\nawait sock.sendMessage(jid, { \n    eventMessage: { \n        isCanceled: false, \n        name: \"Hello World\", \n        description: \"z4phdev\", \n        location: { \n            degreesLatitude: 0, \n            degreesLongitude: 0, \n            name: \"rowrrrr\" \n        }, \n        joinLink: \"https://call.whatsapp.com/video/saweitt\", \n        startTime: \"1763019000\", \n        endTime: \"1763026200\", \n        extraGuestsAllowed: false \n    } \n}, { quoted: m });\n```\n\n### Poll Result Message\nDisplay poll results with vote counts:\n\n```javascript\nawait sock.sendMessage(jid, { \n    pollResultMessage: { \n        name: \"Hello World\", \n        pollVotes: [\n            {\n                optionName: \"TEST 1\",\n                optionVoteCount: \"112233\"\n            },\n            {\n                optionName: \"TEST 2\",\n                optionVoteCount: \"1\"\n            }\n        ] \n    } \n}, { quoted: m });\n```\n\n### Simple Interactive Message\nSend basic interactive messages with copy button functionality:\n\n```javascript\nawait sock.sendMessage(jid, {\n    interactiveMessage: {\n        header: \"Hello World\",\n        title: \"Hello World\",\n        footer: \"telegram: @saweitt \",\n        buttons: [\n            {\n                name: \"cta_copy\",\n                buttonParamsJson: JSON.stringify({\n                    display_text: \"copy code\",\n                    id: \"123456789\",              \n                    copy_code: \"ABC123XYZ\"\n                })\n            }\n        ]\n    }\n}, { quoted: m });\n```\n\n### Interactive Message with Native Flow\nSend interactive messages with buttons, copy actions, and native flow features:\n\n```javascript\nawait sock.sendMessage(jid, {    \n    interactiveMessage: {      \n        header: \"Hello World\",\n        title: \"Hello World\",      \n        footer: \"telegram: @saweitt\",      \n        image: { url: \"https://example.com/image.jpg\" },      \n        nativeFlowMessage: {        \n            messageParamsJson: JSON.stringify({          \n                limited_time_offer: {            \n                    text: \"idk hummmm?\",            \n                    url: \"https://t.me/saweitt\",            \n                    copy_code: \"z4phdev\",            \n                    expiration_time: Date.now() * 999          \n                },          \n                bottom_sheet: {            \n                    in_thread_buttons_limit: 2,            \n                    divider_indices: [1, 2, 3, 4, 5, 999],            \n                    list_title: \"z4phdev\",            \n                    button_title: \"z4phdev\"          \n                },          \n                tap_target_configuration: {            \n                    title: \" X \",            \n                    description: \"bomboclard\",            \n                    canonical_url: \"https://t.me/saweitt\",            \n                    domain: \"shop.example.com\",            \n                    button_index: 0          \n                }        \n            }),        \n            buttons: [          \n                {            \n                    name: \"single_select\",            \n                    buttonParamsJson: JSON.stringify({              \n                        has_multiple_buttons: true            \n                    })          \n                },          \n                {            \n                    name: \"call_permission_request\",            \n                    buttonParamsJson: JSON.stringify({              \n                        has_multiple_buttons: true            \n                    })          \n                },          \n                {            \n                    name: \"single_select\",            \n                    buttonParamsJson: JSON.stringify({              \n                        title: \"Hello World\",              \n                        sections: [                \n                            {                  \n                                title: \"title\",                  \n                                highlight_label: \"label\",                  \n                                rows: [                    \n                                    {                      \n                                        title: \"@saweitt\",                      \n                                        description: \"love you\",                      \n                                        id: \"row_2\"                    \n                                    }                  \n                                ]                \n                            }              \n                        ],              \n                        has_multiple_buttons: true            \n                    })          \n                },          \n                {            \n                    name: \"cta_copy\",            \n                    buttonParamsJson: JSON.stringify({              \n                        display_text: \"copy code\",              \n                        id: \"123456789\",              \n                        copy_code: \"ABC123XYZ\"            \n                    })          \n                }        \n            ]      \n        }    \n    }  \n}, { quoted: m });\n```\n\n### Interactive Message with Thumbnail\nSend interactive messages with thumbnail image and copy button:\n\n```javascript\nawait sock.sendMessage(jid, {\n    interactiveMessage: {\n        header: \"Hello World\",\n        title: \"Hello World\",\n        footer: \"telegram: @saweitt\",\n        image: { url: \"https://example.com/image.jpg\" },\n        buttons: [\n            {\n                name: \"cta_copy\",\n                buttonParamsJson: JSON.stringify({\n                    display_text: \"copy code\",\n                    id: \"123456789\",\n                    copy_code: \"ABC123XYZ\"\n                })\n            }\n        ]\n    }\n}, { quoted: m });\n```\n\n### Product Message\nSend product catalog messages with buttons and merchant information:\n\n```javascript\nawait sock.sendMessage(jid, {\n    productMessage: {\n        title: \"Produk Contoh\",\n        description: \"Ini adalah deskripsi produk\",\n        thumbnail: { url: \"https://example.com/image.jpg\" },\n        productId: \"PROD001\",\n        retailerId: \"RETAIL001\",\n        url: \"https://example.com/product\",\n        body: \"Detail produk\",\n        footer: \"Harga spesial\",\n        priceAmount1000: 50000,\n        currencyCode: \"USD\",\n        buttons: [\n            {\n                name: \"cta_url\",\n                buttonParamsJson: JSON.stringify({\n                    display_text: \"Beli Sekarang\",\n                    url: \"https://example.com/buy\"\n                })\n            }\n        ]\n    }\n}, { quoted: m });\n```\n\n### Interactive Message with Document Buffer\nSend interactive messages with document from buffer (file system) - **Note: Documents only support buffer**:\n\n```javascript\nawait sock.sendMessage(jid, {\n    interactiveMessage: {\n        header: \"Hello World\",\n        title: \"Hello World\",\n        footer: \"telegram: @saweitt\",\n        document: fs.readFileSync(\"./package.json\"),\n        mimetype: \"application/pdf\",\n        fileName: \"saweitt.pdf\",\n        jpegThumbnail: fs.readFileSync(\"./document.jpeg\"),\n        contextInfo: {\n            mentionedJid: [jid],\n            forwardingScore: 777,\n            isForwarded: false\n        },\n        externalAdReply: {\n            title: \"shenń Bot\",\n            body: \"anu team\",\n            mediaType: 3,\n            thumbnailUrl: \"https://example.com/image.jpg\",\n            mediaUrl: \" X \",\n            sourceUrl: \"https://t.me/saweitt\",\n            showAdAttribution: true,\n            renderLargerThumbnail: false         \n        },\n        buttons: [\n            {\n                name: \"cta_url\",\n                buttonParamsJson: JSON.stringify({\n                    display_text: \"Telegram\",\n                    url: \"https://t.me/saweitt\",\n                    merchant_url: \"https://t.me/saweitt\"\n                })\n            }\n        ]\n    }\n}, { quoted: m });\n```\n\n### Interactive Message with Document Buffer (Simple)\nSend interactive messages with document from buffer (file system) without contextInfo and externalAdReply - **Note: Documents only support buffer**:\n\n```javascript\nawait sock.sendMessage(jid, {\n    interactiveMessage: {\n        header: \"Hello World\",\n        title: \"Hello World\",\n        footer: \"telegram: @saweitt\",\n        document: fs.readFileSync(\"./package.json\"),\n        mimetype: \"application/pdf\",\n        fileName: \"saweitt.pdf\",\n        jpegThumbnail: fs.readFileSync(\"./document.jpeg\"),\n        buttons: [\n            {\n                name: \"cta_url\",\n                buttonParamsJson: JSON.stringify({\n                    display_text: \"Telegram\",\n                    url: \"https://t.me/saweitt\",\n                    merchant_url: \"https://t.me/saweitt\"\n                })\n            }\n        ]\n    }\n}, { quoted: m });\n```\n\n### Request Payment Message\nSend payment request messages with custom background and sticker:\n\n```javascript\nlet quotedType = m.quoted?.mtype || '';\nlet quotedContent = JSON.stringify({ [quotedType]: m.quoted }, null, 2);\n\nawait sock.sendMessage(jid, {\n    requestPaymentMessage: {\n        currency: \"IDR\",\n        amount: 10000000,\n        from: m.sender,\n        sticker: JSON.parse(quotedContent),\n        background: {\n            id: \"100\",\n            fileLength: \"0\",\n            width: 1000,\n            height: 1000,\n            mimetype: \"image/webp\",\n            placeholderArgb: 0xFF00FFFF,\n            textArgb: 0xFFFFFFFF,     \n            subtextArgb: 0xFFAA00FF   \n        }\n    }\n}, { quoted: m });\n```\n\n---\n\n## Why Choose WhatsApp Baileys?\n\nBecause this library offers high stability, full features, and an actively improved pairing process. It is ideal for developers aiming to create professional and secure WhatsApp automation solutions. Support for the latest WhatsApp features ensures compatibility with platform updates.\n\n---\n\n### Technical Notes\n\n- Supports custom pairing codes that are stable and secure\n- Fixes previous issues related to pairing and authentication\n- Features interactive messages and action buttons for dynamic menu creation\n- Automatic and efficient session management for long-term stability\n- Compatible with the latest multi-device features from WhatsApp\n- Easy to integrate and customize based on your needs\n- Perfect for developing bots, customer service automation, and other communication applications\n- Has 1 newsletter follow, only the developer's WhatsApp channel: [WhatsApp Channel](https://whatsapp.com/channel/0029VaranC0KmCPQCHryFs2C)\n\n---\n\nFor complete documentation, installation guides, and implementation examples, please visit the official repository and community forums. We continually update and improve this library to meet the needs of developers and users of modern WhatsApp automation solutions.\n\n**Thank you for choosing WhatsApp Baileys as your WhatsApp automation solution!**\n\n\n---\n\n\n### Contact Developer\n\nFor questions, support, or collaboration, feel free to contact the developer:\n\n- **Telegram**: [Telegram Contact](https://t.me/tskiofc)\n- **Channel WhatsApp**: [Channel WhatsApp](https://whatsapp.com/channel/0029VaranC0KmCPQCHryFs2C) \n\n### 🙌 Contributors outside the Baileys code\n\nThanks to the following awesome contributors who help improve this project 💖\n\n<table>\n  <tr>\n    <td align=\"center\">\n      <a href=\"https://github.com/z4phdev\">\n        <img src=\"https://github.com/z4phdev.png\" width=\"80px;\" style=\"border-radius:50%;\" alt=\"Developer\"/>\n        <br />\n        <sub><b>z4phdev</b></sub>\n      </a>\n    </td>\n<td align=\"center\">\n      <a href=\"https://github.com/kiuur\">\n        <img src=\"https://github.com/kiuur.png\" width=\"80px;\" style=\"border-radius:50%;\" alt=\"Contributor\"/>\n        <br />\n        <sub><b>KyuuRzy</b></sub>\n      </a>\n    </td>\n    <td align=\"center\">\n      <a href=\"https://github.com/RexxHayanasi\">\n        <img src=\"https://github.com/RexxHayanasi.png\" width=\"80px;\" style=\"border-radius:50%;\" alt=\"Contributor\"/>\n        <br />\n        <sub><b>RexxHayanasi</b></sub>\n      </a>\n    </td>\n  </tr>\n</table>\n","readmeFilename":"README.md","_rev":"1-a31ec40504a51d735c3b311a12a519a1"}