{"_id":"@hanzofc/baileys","_rev":"3-8fe15228c110adc6b164ce9de34567f4","name":"@hanzofc/baileys","dist-tags":{"latest":"7.0.1"},"versions":{"7.0.0-rc14":{"name":"@hanzofc/baileys","version":"7.0.0-rc14","keywords":["whatsapp","automation"],"author":{"name":"Rajeh Taher"},"license":"MIT","_id":"@hanzofc/baileys@7.0.0-rc14","maintainers":[{"name":"hanzofc","email":"hanzofc616@gmail.com"}],"homepage":"https://github.com/WhiskeySockets/Baileys/","bugs":{"url":"https://github.com/WhiskeySockets/Baileys/issues"},"dist":{"shasum":"f406393645a875dbecfd2d376d32aa8522f8f1e8","tarball":"https://registry.npmjs.org/@hanzofc/baileys/-/baileys-7.0.0-rc14.tgz","fileCount":409,"integrity":"sha512-pNbS+f0yfL8htTU/Wzc61QKBcONm0PV4XY/AwC8hIBMypMzwX9GhfZfV0JbrRLEUwGFL6ZkphvRmkf0nAnRqag==","signatures":[{"sig":"MEUCIGxUZRcj5lBWZnYNcEkOCVVDy4+/NGoiJ1k5+o8Wg8yrAiEA+/yLtCks+N7VgdNHeQreLqO1c27+SmwWTfIjBOmxUhU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8557616},"main":"lib/index.js","type":"module","types":"lib/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"9c8e7ffa316294d483f22f3b0415ac60f58f7ea8","scripts":{"lint":"tsc && eslint src --ext .js,.ts","test":"node --experimental-vm-modules ./node_modules/.bin/jest --testMatch '**/*.test.ts'","build":"tsc -P tsconfig.build.json && tsc-esm-fix --tsconfig=tsconfig.build.json --ext=.js","format":"prettier --write \"src/**/*.{ts,js,json,md}\"","example":"tsx ./Example/example.ts","prepack":"npm run build","prepare":"npm run build","release":"release-it","lint:fix":"npm run format && npm run lint -- --fix","test:e2e":"NODE_TLS_REJECT_UNAUTHORIZED=0 node --experimental-vm-modules ./node_modules/.bin/jest --runInBand --forceExit --testMatch '**/*.test-e2e.ts'","build:all":"npm run build && npm run build:docs","build:docs":"typedoc","preinstall":"node ./engine-requirements.js","gen:protobuf":"sh WAProto/GenerateStatics.sh","changelog:last":"conventional-changelog -p angular -r 2","update:version":"tsx ./scripts/update-version.ts","changelog:update":"conventional-changelog -p angular -i CHANGELOG.md -s -r 0","changelog:preview":"conventional-changelog -p angular -u"},"_npmUser":{"name":"hanzofc","email":"hanzofc616@gmail.com"},"repository":{"url":"git+ssh://git@github.com/WhiskeySockets/Baileys.git"},"_npmVersion":"10.9.2","description":"A WebSockets library for interacting with WhatsApp Web","directories":{},"resolutions":{"tar":"^7.5.11","tmp":"^0.2.5","socks":"^2.8.8","flatted":"^3.4.2","basic-ftp":"^5.2.4","handlebars":"^4.7.9","ip-address":"^10.1.1","underscore":"^1.13.8","markdown-it":"^14.1.1","ajv@npm:^6.12.4":"^6.14.0","yaml@npm:^2.6.1":"^2.8.4","glob@npm:^10.2.2":"^10.5.0","glob@npm:^10.5.0":"^10.5.0","glob@npm:^10.3.10":"^10.5.0","js-yaml@npm:^4.1.0":"^4.1.1","js-yaml@npm:^3.13.1":"^3.14.2","minimatch@npm:^3.0.4":"^3.1.5","minimatch@npm:^3.1.2":"^3.1.5","minimatch@npm:^5.0.1":"^5.1.8","minimatch@npm:^9.0.4":"^9.0.9","minimatch@npm:^9.0.5":"^9.0.9","picomatch@npm:^2.0.4":"^2.3.2","picomatch@npm:^2.3.1":"^2.3.2","picomatch@npm:^4.0.0":"^4.0.4","picomatch@npm:^4.0.2":"^4.0.4","brace-expansion@npm:^1.1.7":"^1.1.13","brace-expansion@npm:^2.0.1":"^2.0.3"},"_nodeVersion":"22.14.0","dependencies":{"ws":"^8.13.0","pino":"^9.6","p-queue":"^9.0.0","libsignal":"^6.0.0","lru-cache":"^11.1.0","@hapi/boom":"^9.1.3","protobufjs":"^7.5.6","async-mutex":"^0.5.0","music-metadata":"^11.12.3","whatsapp-rust-bridge":"0.5.4","@cacheable/node-cache":"^1.4.0"},"_hasShrinkwrap":false,"packageManager":"yarn@4.9.2","devDependencies":{"tsx":"^4.20.3","jest":"^30.0.5","jimp":"^1.6.1","jiti":"^2.4.2","json":"^11.0.0","open":"^8.4.2","eslint":"^9","ts-jest":"^29.4.0","typedoc":"^0.27.9","prettier":"^3.5.3","@types/ws":"^8.0.0","lru-cache":"^11.1.0","@eslint/js":"^9.31.0","release-it":"^20.0.1","typescript":"^5.8.2","@types/jest":"^30.0.0","@types/node":"^20.9.0","pino-pretty":"^13.1.1","tsc-esm-fix":"^3.1.2","protobufjs-cli":"^1.1.3","link-preview-js":"^3.0.0","@eslint/eslintrc":"^3.3.1","esbuild-register":"^3.6.0","conventional-changelog":"^7.1.1","eslint-config-prettier":"^10.1.2","eslint-plugin-prettier":"^5.4.0","typedoc-plugin-markdown":"4.4.2","@typescript-eslint/parser":"^8","@whiskeysockets/eslint-config":"^1.0.0","conventional-changelog-angular":"^8.0.0","@typescript-eslint/eslint-plugin":"^8"},"peerDependencies":{"jimp":"^1.6.1","sharp":"*","audio-decode":"^2.1.3","link-preview-js":"^3.0.0"},"peerDependenciesMeta":{"jimp":{"optional":true},"audio-decode":{"optional":true},"link-preview-js":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/baileys_7.0.0-rc14_1790602933509_0.4703163064264144","host":"s3://npm-registry-packages-npm-production"}},"7.0.0":{"name":"@hanzofc/baileys","version":"7.0.0","keywords":["whatsapp","automation"],"author":{"name":"Rajeh Taher"},"license":"MIT","_id":"@hanzofc/baileys@7.0.0","maintainers":[{"name":"hanzofc","email":"hanzofc616@gmail.com"}],"homepage":"https://github.com/harissfx/Baileys3","bugs":{"url":"https://github.com/harissfx/Baileys3/issues"},"dist":{"shasum":"4bd056b8070dfeca942f89cdc4186586fa7bed21","tarball":"https://registry.npmjs.org/@hanzofc/baileys/-/baileys-7.0.0.tgz","fileCount":409,"integrity":"sha512-p45FH8z8UUQtT2V0fH9I2WTybzuprCcfYxqoCvnRGd0vD0vkjqE7uQFtzX92qXFvelIi6NjjM4BUSoASnXfbvw==","signatures":[{"sig":"MEQCIHL3dOnWL73opGJKca4dbvg4NtfcTDhMxdmOqGhiFrR4AiAgtljugdSFxas+auU+waFQRbSwq6avZ2AVl0TANqXatg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIHm5C3dmAxMaDuhFpfuk5xTDRFuccJgx7YUHIKs2i8+7AiEAv3N4s3mceAECiXUdjB401HEjBR4fNcZ3anm9ueq7FyU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8557681},"main":"lib/index.js","type":"module","types":"lib/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"35b0e56da84de494338411c36d21a1479b6fb1ec","scripts":{"lint":"tsc && eslint src --ext .js,.ts","test":"node --experimental-vm-modules ./node_modules/.bin/jest --testMatch '**/*.test.ts'","build":"tsc -P tsconfig.build.json && tsc-esm-fix --tsconfig=tsconfig.build.json --ext=.js","format":"prettier --write \"src/**/*.{ts,js,json,md}\"","example":"tsx ./Example/example.ts","prepack":"npm run build","prepare":"npm run build","release":"release-it","lint:fix":"npm run format && npm run lint -- --fix","test:e2e":"NODE_TLS_REJECT_UNAUTHORIZED=0 node --experimental-vm-modules ./node_modules/.bin/jest --runInBand --forceExit --testMatch '**/*.test-e2e.ts'","build:all":"npm run build && npm run build:docs","build:docs":"typedoc","preinstall":"node ./engine-requirements.js","gen:protobuf":"sh WAProto/GenerateStatics.sh","changelog:last":"conventional-changelog -p angular -r 2","update:version":"tsx ./scripts/update-version.ts","changelog:update":"conventional-changelog -p angular -i CHANGELOG.md -s -r 0","changelog:preview":"conventional-changelog -p angular -u"},"_npmUser":{"name":"hanzofc","email":"hanzofc616@gmail.com"},"repository":{"url":"git+https://github.com/harissfx/Baileys3.git","type":"git"},"_npmVersion":"10.9.2","description":"A customized fork of WhiskeySockets/Baileys with additional fixes and modifications for WhatsApp automation.","directories":{},"resolutions":{"tar":"^7.5.11","tmp":"^0.2.5","socks":"^2.8.8","flatted":"^3.4.2","basic-ftp":"^5.2.4","handlebars":"^4.7.9","ip-address":"^10.1.1","underscore":"^1.13.8","markdown-it":"^14.1.1","ajv@npm:^6.12.4":"^6.14.0","yaml@npm:^2.6.1":"^2.8.4","glob@npm:^10.2.2":"^10.5.0","glob@npm:^10.5.0":"^10.5.0","glob@npm:^10.3.10":"^10.5.0","js-yaml@npm:^4.1.0":"^4.1.1","js-yaml@npm:^3.13.1":"^3.14.2","minimatch@npm:^3.0.4":"^3.1.5","minimatch@npm:^3.1.2":"^3.1.5","minimatch@npm:^5.0.1":"^5.1.8","minimatch@npm:^9.0.4":"^9.0.9","minimatch@npm:^9.0.5":"^9.0.9","picomatch@npm:^2.0.4":"^2.3.2","picomatch@npm:^2.3.1":"^2.3.2","picomatch@npm:^4.0.0":"^4.0.4","picomatch@npm:^4.0.2":"^4.0.4","brace-expansion@npm:^1.1.7":"^1.1.13","brace-expansion@npm:^2.0.1":"^2.0.3"},"_nodeVersion":"22.14.0","dependencies":{"ws":"^8.13.0","pino":"^9.6","p-queue":"^9.0.0","libsignal":"^6.0.0","lru-cache":"^11.1.0","@hapi/boom":"^9.1.3","protobufjs":"^7.5.6","async-mutex":"^0.5.0","music-metadata":"^11.12.3","whatsapp-rust-bridge":"0.5.4","@cacheable/node-cache":"^1.4.0"},"_hasShrinkwrap":false,"packageManager":"yarn@4.9.2","devDependencies":{"tsx":"^4.20.3","jest":"^30.0.5","jimp":"^1.6.1","jiti":"^2.4.2","json":"^11.0.0","open":"^8.4.2","eslint":"^9","ts-jest":"^29.4.0","typedoc":"^0.27.9","prettier":"^3.5.3","@types/ws":"^8.0.0","lru-cache":"^11.1.0","@eslint/js":"^9.31.0","release-it":"^20.0.1","typescript":"^5.8.2","@types/jest":"^30.0.0","@types/node":"^20.9.0","pino-pretty":"^13.1.1","tsc-esm-fix":"^3.1.2","protobufjs-cli":"^1.1.3","link-preview-js":"^3.0.0","@eslint/eslintrc":"^3.3.1","esbuild-register":"^3.6.0","conventional-changelog":"^7.1.1","eslint-config-prettier":"^10.1.2","eslint-plugin-prettier":"^5.4.0","typedoc-plugin-markdown":"4.4.2","@typescript-eslint/parser":"^8","@whiskeysockets/eslint-config":"^1.0.0","conventional-changelog-angular":"^8.0.0","@typescript-eslint/eslint-plugin":"^8"},"peerDependencies":{"jimp":"^1.6.1","sharp":"*","audio-decode":"^2.1.3","link-preview-js":"^3.0.0"},"peerDependenciesMeta":{"jimp":{"optional":true},"audio-decode":{"optional":true},"link-preview-js":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/baileys_7.0.0_1790603736444_0.7472239439972397","host":"s3://npm-registry-packages-npm-production"}},"7.0.1":{"_id":"@hanzofc/baileys@7.0.1","bugs":{"url":"https://github.com/harissfx/Baileys3/issues"},"dist":{"shasum":"ca8b9fd532ea812e143e36bd96d323057ac43f49","tarball":"https://registry.npmjs.org/@hanzofc/baileys/-/baileys-7.0.1.tgz","fileCount":409,"integrity":"sha512-wKjK2Q7DAgTXy34Yd76N4prc8nwLlviSxa2cPlq++e39OhDklXIlXWSgjJ+AfFah5nMIXt36It6Te3XnM6KWMg==","signatures":[{"sig":"MEUCIQCRK1Gosh2y8YU+rdZkgDYC/56ryq0+U9+K5r+j1Vjg5QIgGBJBRkOLNZg+wevSAvByQnXF0RKiYj3P8EoUCpqC+jQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDkZeUSm6DCnuxLqROAyS3M0bJDwLuqYcPFY1FljKb7UwIhAILBb+HkKyrEogoqH264coREN60Ht2GSpdZA92LRXar0"}],"unpackedSize":8538989},"main":"lib/index.js","name":"@hanzofc/baileys","type":"module","types":"lib/index.d.ts","author":{"name":"Rajeh Taher"},"engines":{"node":">=20.0.0"},"gitHead":"d322392310e509c85ccc925c2aad7906be941236","license":"MIT","scripts":{"lint":"tsc && eslint src --ext .js,.ts","test":"node --experimental-vm-modules ./node_modules/.bin/jest --testMatch '**/*.test.ts'","build":"tsc -P tsconfig.build.json && tsc-esm-fix --tsconfig=tsconfig.build.json --ext=.js","format":"prettier --write \"src/**/*.{ts,js,json,md}\"","example":"tsx ./Example/example.ts","prepack":"npm run build","prepare":"npm run build","release":"release-it","lint:fix":"npm run format && npm run lint -- --fix","test:e2e":"NODE_TLS_REJECT_UNAUTHORIZED=0 node --experimental-vm-modules ./node_modules/.bin/jest --runInBand --forceExit --testMatch '**/*.test-e2e.ts'","build:all":"npm run build && npm run build:docs","build:docs":"typedoc","preinstall":"node ./engine-requirements.js","gen:protobuf":"sh WAProto/GenerateStatics.sh","changelog:last":"conventional-changelog -p angular -r 2","update:version":"tsx ./scripts/update-version.ts","changelog:update":"conventional-changelog -p angular -i CHANGELOG.md -s -r 0","changelog:preview":"conventional-changelog -p angular -u"},"version":"7.0.1","_npmUser":{"name":"hanzofc","email":"hanzofc616@gmail.com"},"homepage":"https://github.com/harissfx/Baileys3","keywords":["whatsapp","automation"],"repository":{"url":"git+https://github.com/harissfx/Baileys3.git","type":"git"},"_npmVersion":"10.9.2","description":"A customized fork of WhiskeySockets/Baileys with additional fixes and modifications for WhatsApp automation.","directories":{},"maintainers":[{"name":"hanzofc","email":"hanzofc616@gmail.com"}],"resolutions":{"tar":"^7.5.11","tmp":"^0.2.5","socks":"^2.8.8","flatted":"^3.4.2","basic-ftp":"^5.2.4","handlebars":"^4.7.9","ip-address":"^10.1.1","underscore":"^1.13.8","markdown-it":"^14.1.1","ajv@npm:^6.12.4":"^6.14.0","yaml@npm:^2.6.1":"^2.8.4","glob@npm:^10.2.2":"^10.5.0","glob@npm:^10.5.0":"^10.5.0","glob@npm:^10.3.10":"^10.5.0","js-yaml@npm:^4.1.0":"^4.1.1","js-yaml@npm:^3.13.1":"^3.14.2","minimatch@npm:^3.0.4":"^3.1.5","minimatch@npm:^3.1.2":"^3.1.5","minimatch@npm:^5.0.1":"^5.1.8","minimatch@npm:^9.0.4":"^9.0.9","minimatch@npm:^9.0.5":"^9.0.9","picomatch@npm:^2.0.4":"^2.3.2","picomatch@npm:^2.3.1":"^2.3.2","picomatch@npm:^4.0.0":"^4.0.4","picomatch@npm:^4.0.2":"^4.0.4","brace-expansion@npm:^1.1.7":"^1.1.13","brace-expansion@npm:^2.0.1":"^2.0.3"},"_nodeVersion":"22.14.0","dependencies":{"ws":"^8.13.0","pino":"^9.6","p-queue":"^9.0.0","libsignal":"^6.0.0","lru-cache":"^11.1.0","@hapi/boom":"^9.1.3","protobufjs":"^7.5.6","async-mutex":"^0.5.0","music-metadata":"^11.12.3","whatsapp-rust-bridge":"0.5.4","@cacheable/node-cache":"^1.4.0"},"_hasShrinkwrap":false,"packageManager":"yarn@4.9.2","devDependencies":{"tsx":"^4.20.3","jest":"^30.0.5","jimp":"^1.6.1","jiti":"^2.4.2","json":"^11.0.0","open":"^8.4.2","eslint":"^9","ts-jest":"^29.4.0","typedoc":"^0.27.9","prettier":"^3.5.3","@types/ws":"^8.0.0","lru-cache":"^11.1.0","@eslint/js":"^9.31.0","release-it":"^20.0.1","typescript":"^5.8.2","@types/jest":"^30.0.0","@types/node":"^20.9.0","pino-pretty":"^13.1.1","tsc-esm-fix":"^3.1.2","protobufjs-cli":"^1.1.3","link-preview-js":"^3.0.0","@eslint/eslintrc":"^3.3.1","esbuild-register":"^3.6.0","conventional-changelog":"^7.1.1","eslint-config-prettier":"^10.1.2","eslint-plugin-prettier":"^5.4.0","typedoc-plugin-markdown":"4.4.2","@typescript-eslint/parser":"^8","@whiskeysockets/eslint-config":"^1.0.0","conventional-changelog-angular":"^8.0.0","@typescript-eslint/eslint-plugin":"^8"},"peerDependencies":{"jimp":"^1.6.1","sharp":"*","audio-decode":"^2.1.3","link-preview-js":"^3.0.0"},"peerDependenciesMeta":{"jimp":{"optional":true},"audio-decode":{"optional":true},"link-preview-js":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/baileys_7.0.1_1790605864090_0.6405615199478478"}}},"time":{"created":"2026-09-28T13:42:13.248Z","modified":"2026-09-28T14:31:04.449Z","7.0.0-rc14":"2026-09-28T13:42:13.726Z","7.0.0":"2026-09-28T13:55:36.586Z","7.0.1":"2026-09-28T14:31:04.256Z"},"bugs":{"url":"https://github.com/harissfx/Baileys3/issues"},"author":{"name":"Rajeh Taher"},"license":"MIT","homepage":"https://github.com/harissfx/Baileys3","keywords":["whatsapp","automation"],"repository":{"url":"git+https://github.com/harissfx/Baileys3.git","type":"git"},"description":"A customized fork of WhiskeySockets/Baileys with additional fixes and modifications for WhatsApp automation.","maintainers":[{"name":"hanzofc","email":"hanzofc616@gmail.com"}],"readme":"# @hanzofc/baileys\n\n<div align=\"center\">\n  <img alt=\"Baileys logo\" src=\"https://raw.githubusercontent.com/WhiskeySockets/Baileys/refs/heads/master/Media/logo.png\" height=\"75\"/>\n</div>\n\n<div align=\"center\">\n  A customized fork of Baileys with additional fixes, modifications, and improvements.\n</div>\n\n<br />\n\n<div align=\"center\">\n  <a href=\"https://www.npmjs.com/package/@hanzofc/baileys\">\n    <img src=\"https://img.shields.io/npm/v/@hanzofc/baileys.svg\" alt=\"npm version\" />\n  </a>\n  <a href=\"https://github.com/harissfx/Baileys3\">\n    <img src=\"https://img.shields.io/github/stars/harissfx/Baileys3.svg\" alt=\"GitHub stars\" />\n  </a>\n  <a href=\"https://github.com/harissfx/Baileys3\">\n    <img src=\"https://img.shields.io/github/license/harissfx/Baileys3.svg\" alt=\"license\" />\n  </a>\n</div>\n\n> [!IMPORTANT]\n> This project is a **modified fork of [WhiskeySockets/Baileys](https://github.com/WhiskeySockets/Baileys)**.\n>\n> The original Baileys project and its upstream contributors are credited below. This fork is independently maintained and published as `@hanzofc/baileys`.\n\n## About\n\n`@hanzofc/baileys` is a customized fork of **Baileys**, a TypeScript library for interacting with WhatsApp Web through WebSockets.\n\nThis fork is maintained separately from the upstream project and contains additional fixes, modifications, and changes used by the author for WhatsApp automation projects.\n\n### Features\n\n* WhatsApp Web socket connection\n* Multi-device support\n* TypeScript support\n* Authentication state management\n* Message sending and receiving\n* Group management\n* Media messages\n* Interactive messages (buttons, lists, native flow with the required `biz` nodes)\n* Presence updates\n* Contact and profile information\n* Event-based architecture\n* Extra message types: product, order, payment request, event, album, poll result, group status, group member label\n* `richMenu` and `sendHtml` helpers\n* `useSqliteAuthState` (single-file SQLite auth storage)\n* Fine-grained relay options (`isSecret`, `protected`, `me`)\n* Additional fixes and modifications maintained in this fork\n\n## Differences from Upstream\n\nThis fork is based on [WhiskeySockets/Baileys](https://github.com/WhiskeySockets/Baileys) `7.0.0-rc14` (compared against upstream commit `0af2386`, \"advertise WIN_HYBRID instead of retired WIN32 web sub-platform\"). Everything else in the library behaves like upstream.\n\n| Area | Upstream | This fork |\n| --- | --- | --- |\n| Package name | `baileys` | `@hanzofc/baileys` |\n| Version | `7.0.0-rc14` | `7.0.0` |\n| Auth state | `useMultiFileAuthState` | Adds `useSqliteAuthState` (needs Node 22.5+) |\n| `sendMessage` content | Standard content types | Adds `productMessage`, `orderMessage`, `requestPaymentMessage`, `eventMessage`, `albumMessage`, `pollResultMessage`, `groupStatus`, `groupLabel` |\n| Extra socket methods | - | `richMenu(jid, content)`, `sendHtml(jid, html)` |\n| Interactive messages | Sent as-is | Adds `biz` / `native_flow` / `bot` nodes automatically for buttons, lists and native flow |\n| `relayMessage` options | `participant` (retry resend) | Retry resend renamed to `participants`; `participant` now means \"recipient only\"; adds `isSecret`, `protected`, `me` |\n| Client platform | `WEB`, or `ANDROID` if the browser name contains \"android\" | Always `MACOS` |\n| On connect | Nothing extra | Auto-follows the newsletter JIDs listed in `AUTO_FOLLOW_NEWSLETTER_JIDS` |\n| Protobuf | Upstream definitions | Adds `BloksWidget` to `WAProto` |\n| Build output | - | ESM imports use explicit `.js` extensions |\n\n> [!WARNING]\n> Some of these changes affect behavior or the public API. Read the sections below before upgrading from upstream.\n\n### Requirements\n\n* Node.js 20 or newer (enforced by `engine-requirements.js` on install)\n* Node.js 22.5 or newer only if you use `useSqliteAuthState` (it relies on the built-in `node:sqlite` module)\n\n### Breaking / behavior changes\n\n**Retry resend option renamed.** Upstream passes `{ participant: { jid, count } }` to `relayMessage` when re-sending after a failed decryption. In this fork that option is `participants`. `participant: { jid }` (without `count`) now targets only that recipient. If you call `relayMessage` directly with the old shape, update your code.\n\n**Client platform is always `MACOS`.** Upstream chooses `WEB` (or `ANDROID` when `browser[1]` contains \"android\"). This fork always advertises `MACOS` in the client payload.\n\n**Newsletter auto-follow.** On the first `connection: 'open'`, the socket calls `newsletterFollow` for each JID in `AUTO_FOLLOW_NEWSLETTER_JIDS` (defined in `src/Socket/index.ts`). Errors are ignored. There is currently no config option for this: to disable it, empty that array in the source and rebuild.\n\n## Installation\n\nInstall the package directly from npm:\n\n```bash\nnpm install @hanzofc/baileys\n```\n\nUsing yarn:\n\n```bash\nyarn add @hanzofc/baileys\n```\n\nUsing pnpm:\n\n```bash\npnpm add @hanzofc/baileys\n```\n\n### Existing projects using `baileys`\n\nIf your project already imports the package using:\n\n```ts\nimport makeWASocket from 'baileys'\n```\n\nyou can install this fork using an npm alias:\n\n```bash\nnpm install baileys@npm:@hanzofc/baileys\n```\n\nThis allows existing imports using `baileys` to continue working without changing every import in your project.\n\n## Usage\n\n```ts\nimport makeWASocket from '@hanzofc/baileys'\n\nconst sock = makeWASocket({\n    // options\n})\n```\n\nIf you installed the package using the npm alias:\n\n```bash\nnpm install baileys@npm:@hanzofc/baileys\n```\n\nyou can continue using:\n\n```ts\nimport makeWASocket from 'baileys'\n```\n\n## Authentication\n\nBaileys uses an authentication state to store the credentials required to reconnect to WhatsApp.\n\nA common setup is to use `useMultiFileAuthState`:\n\n```ts\nimport makeWASocket, {\n    DisconnectReason,\n    useMultiFileAuthState\n} from '@hanzofc/baileys'\n\nconst { state, saveCreds } = await useMultiFileAuthState('auth_info_baileys')\n\nconst sock = makeWASocket({\n    auth: state\n})\n\nsock.ev.on('creds.update', saveCreds)\n```\n\nThe authentication files should generally not be committed to Git.\n\nAdd your authentication directory to `.gitignore`:\n\n```gitignore\nauth_info_baileys/\n```\n\n### SQLite auth state\n\nAs an alternative to many JSON files, the whole auth state can be stored in a single SQLite database:\n\n```ts\nimport makeWASocket, { useSqliteAuthState } from '@hanzofc/baileys'\n\nconst { state, saveCreds, close } = await useSqliteAuthState('./auth')\n\nconst sock = makeWASocket({ auth: state })\n\nsock.ev.on('creds.update', saveCreds)\n```\n\nNotes:\n\n* Requires Node.js 22.5+ (built-in `node:sqlite`). On older versions it throws and you should use `useMultiFileAuthState` instead.\n* The first argument is either a `.db` / `.sqlite` / `.sqlite3` file path or a folder. For a folder the file is `auth.db` unless you set `fileName`.\n* To migrate an existing `useMultiFileAuthState` folder, pass `migrateFromFolder`. It is only used when the database has no credentials yet.\n* Call `close()` when you shut the socket down.\n\n```ts\nconst { state, saveCreds } = await useSqliteAuthState('./auth', {\n    fileName: 'auth.db',\n    migrateFromFolder: './auth_info_baileys'\n})\n```\n\nAdd the database to `.gitignore` as well:\n\n```gitignore\nauth/\n```\n\n## Connection Handling\n\nYou can listen for connection updates using `connection.update`:\n\n```ts\nsock.ev.on('connection.update', (update) => {\n    const { connection, lastDisconnect } = update\n\n    if (connection === 'close') {\n        console.log('connection closed')\n\n        const shouldReconnect =\n            (lastDisconnect?.error as any)?.output?.statusCode !== DisconnectReason.loggedOut\n\n        if (shouldReconnect) {\n            // reconnect\n        }\n    }\n\n    if (connection === 'open') {\n        console.log('connected')\n    }\n})\n```\n\n## Sending Messages\n\n### Text\n\n```ts\nawait sock.sendMessage(jid, {\n    text: 'Hello World!'\n})\n```\n\n### Image\n\n```ts\nawait sock.sendMessage(jid, {\n    image: { url: './image.jpg' },\n    caption: 'Hello!'\n})\n```\n\n### Video\n\n```ts\nawait sock.sendMessage(jid, {\n    video: { url: './video.mp4' },\n    caption: 'Hello!'\n})\n```\n\n### Audio\n\n```ts\nawait sock.sendMessage(jid, {\n    audio: { url: './audio.mp3' },\n    mimetype: 'audio/mpeg'\n})\n```\n\n### Document\n\n```ts\nawait sock.sendMessage(jid, {\n    document: { url: './document.pdf' },\n    mimetype: 'application/pdf',\n    fileName: 'document.pdf'\n})\n```\n\n### Sticker\n\n```ts\nawait sock.sendMessage(jid, {\n    sticker: { url: './sticker.webp' }\n})\n```\n\n## Replying to Messages\n\nMessages can be quoted when sending a response:\n\n```ts\nawait sock.sendMessage(\n    jid,\n    {\n        text: 'This is a reply'\n    },\n    {\n        quoted: message\n    }\n)\n```\n\n## Message Events\n\nIncoming messages can be handled through `messages.upsert`:\n\n```ts\nsock.ev.on('messages.upsert', async ({ messages }) => {\n    for (const message of messages) {\n        console.log(message)\n    }\n})\n```\n\nFor example:\n\n```ts\nsock.ev.on('messages.upsert', async ({ messages }) => {\n    const msg = messages[0]\n\n    if (!msg.message) return\n\n    console.log(msg.message)\n})\n```\n\n## Groups\n\n### Get Group Metadata\n\n```ts\nconst metadata = await sock.groupMetadata(jid)\n\nconsole.log(metadata)\n```\n\n### Create a Group\n\n```ts\nconst group = await sock.groupCreate('My Group', [\n    '1234567890@s.whatsapp.net'\n])\n```\n\n### Add Participants\n\n```ts\nawait sock.groupParticipantsUpdate(\n    jid,\n    ['1234567890@s.whatsapp.net'],\n    'add'\n)\n```\n\n### Remove Participants\n\n```ts\nawait sock.groupParticipantsUpdate(\n    jid,\n    ['1234567890@s.whatsapp.net'],\n    'remove'\n)\n```\n\n### Promote Participants\n\n```ts\nawait sock.groupParticipantsUpdate(\n    jid,\n    ['1234567890@s.whatsapp.net'],\n    'promote'\n)\n```\n\n### Demote Participants\n\n```ts\nawait sock.groupParticipantsUpdate(\n    jid,\n    ['1234567890@s.whatsapp.net'],\n    'demote'\n)\n```\n\n## Presence\n\nPresence can be updated using:\n\n```ts\nawait sock.sendPresenceUpdate('available', jid)\n```\n\nAvailable presence values include:\n\n```text\navailable\nunavailable\ncomposing\nrecording\npaused\n```\n\nFor example:\n\n```ts\nawait sock.sendPresenceUpdate('composing', jid)\n\nawait new Promise(resolve => setTimeout(resolve, 2000))\n\nawait sock.sendPresenceUpdate('paused', jid)\n```\n\n## Contacts\n\nYou can request information about a WhatsApp user:\n\n```ts\nconst result = await sock.onWhatsApp('1234567890')\nconsole.log(result)\n```\n\n## Profile Picture\n\n```ts\nconst profilePicture = await sock.profilePictureUrl(\n    jid,\n    'image'\n)\n\nconsole.log(profilePicture)\n```\n\nDepending on the account and privacy settings, the profile picture may not be available.\n\n## Presence Updates\n\nYou can subscribe to presence updates:\n\n```ts\nsock.ev.on('presence.update', (update) => {\n    console.log(update)\n})\n```\n\n## Typing Indicators\n\nTo indicate that the bot is typing:\n\n```ts\nawait sock.sendPresenceUpdate('composing', jid)\n```\n\nStop typing:\n\n```ts\nawait sock.sendPresenceUpdate('paused', jid)\n```\n\n## Read Receipts\n\nMessages can be marked as read:\n\n```ts\nawait sock.readMessages([\n    message.key\n])\n```\n\n## Reactions\n\nSend a reaction to a message:\n\n```ts\nawait sock.sendMessage(\n    jid,\n    {\n        react: {\n            text: '👍',\n            key: message.key\n        }\n    }\n)\n```\n\nRemove a reaction:\n\n```ts\nawait sock.sendMessage(\n    jid,\n    {\n        react: {\n            text: '',\n            key: message.key\n        }\n    }\n)\n```\n\n## Deleting Messages\n\nFor messages that can be deleted:\n\n```ts\nawait sock.sendMessage(\n    jid,\n    {\n        delete: message.key\n    }\n)\n```\n\n## Editing Messages\n\nDepending on the message type and supported WhatsApp functionality:\n\n```ts\nawait sock.sendMessage(\n    jid,\n    {\n        text: 'Edited message',\n        edit: message.key\n    }\n)\n```\n\n## Forwarding Messages\n\nMessages can be forwarded using the appropriate message structure:\n\n```ts\nawait sock.sendMessage(\n    jid,\n    {\n        forward: message\n    }\n)\n```\n\nThe exact structure may vary depending on the message type and Baileys version.\n\n## Media\n\nBaileys supports sending different types of media, including:\n\n* Images\n* Videos\n* Audio\n* Documents\n* Stickers\n\nExample:\n\n```ts\nawait sock.sendMessage(jid, {\n    image: {\n        url: './image.jpg'\n    },\n    caption: 'Example image'\n})\n```\n\nFor remote media:\n\n```ts\nawait sock.sendMessage(jid, {\n    image: {\n        url: 'https://example.com/image.jpg'\n    }\n})\n```\n\n## Downloading Media\n\nMedia can be downloaded from received messages using the media download utilities provided by the library.\n\nExample:\n\n```ts\nimport {\n    downloadMediaMessage\n} from '@hanzofc/baileys'\n\nconst buffer = await downloadMediaMessage(\n    message,\n    'buffer',\n    {}\n)\n```\n\nThe exact download options depend on the message type and library version.\n\n## Interactive Messages\n\nButtons, list messages and native flow messages are sent through `sendMessage` as usual. This fork adds the `biz` (and, for private chats, `bot`) binary nodes needed for them to render, so you do not need to pass `additionalNodes` yourself.\n\nSupport for particular interactive formats can change as WhatsApp updates its protocol. Check the exported types for the currently supported structures.\n\n### Rich menu\n\n`richMenu` sends quick-reply buttons or a carousel of cards, with an optional image header and an open-URL footer:\n\n```ts\nawait sock.richMenu(jid, {\n    header: { title: 'Menu', image: { url: 'https://example.com/banner.png' } },\n    body: { title: 'Choose one', buttons: ['Option 1', 'Option 2'] },\n    footer: { text: 'Open website', url: 'https://example.com' }\n})\n```\n\nCarousel / row of cards:\n\n```ts\nawait sock.richMenu(jid, {\n    body: {\n        carousel: true, // or row: true\n        cards: [\n            { title: 'Card 1', buttons: ['Select'] },\n            { title: 'Card 2', buttons: ['Select'] }\n        ]\n    }\n})\n```\n\n### HTML\n\n```ts\nawait sock.sendHtml(jid, '<h1>Hello</h1>')\n```\n\n> [!NOTE]\n> `richMenu` and `sendHtml` rely on WhatsApp client behavior that is not officially documented, so they may stop working or render differently after a WhatsApp update.\n\n## Special Messages\n\nThese content types are handled by `sendMessage` in this fork and are not available in upstream. They are detected automatically from the content object.\n\n### Product\n\n```ts\nawait sock.sendMessage(jid, {\n    productMessage: {\n        title: 'Product name',\n        description: 'Description',\n        thumbnail: { url: './product.jpg' },\n        productId: '123',\n        retailerId: 'shop',\n        url: 'https://example.com',\n        body: 'Body text',\n        footer: 'Footer text',\n        priceAmount1000: 25000000,\n        currencyCode: 'IDR',\n        buttons: []\n    }\n})\n```\n\n### Order\n\n```ts\nawait sock.sendMessage(jid, {\n    orderMessage: {\n        orderTitle: 'Order #1',\n        message: 'Thanks for your order',\n        totalAmount1000: 50000000,\n        totalCurrencyCode: 'IDR',\n        itemCount: 2,\n        thumbnail: { url: './order.jpg' }\n    }\n})\n```\n\n### Payment request\n\n```ts\nawait sock.sendMessage(jid, {\n    requestPaymentMessage: {\n        amount: 10000000, // amount x 1000\n        currency: 'IDR',  // default: IDR\n        from: '1234567890@s.whatsapp.net',\n        note: 'Payment note'\n    }\n})\n```\n\n### Event\n\n```ts\nawait sock.sendMessage(jid, {\n    eventMessage: {\n        name: 'Meetup',\n        description: 'Monthly meetup',\n        startTime: 1790000000,\n        endTime: 1790003600,\n        location: { degreesLatitude: -7.25, degreesLongitude: 112.75, name: 'Surabaya' }\n    }\n})\n```\n\n### Album\n\n```ts\nawait sock.sendMessage(jid, {\n    albumMessage: [\n        { image: { url: './1.jpg' }, caption: 'First' },\n        { image: { url: './2.jpg' } },\n        { video: { url: './3.mp4' } }\n    ]\n})\n```\n\n### Poll result\n\n```ts\nawait sock.sendMessage(jid, {\n    pollResultMessage: {\n        name: 'Favorite color?',\n        options: [\n            { optionName: 'Red', optionVoteCount: 10 },\n            { optionName: 'Blue', optionVoteCount: 7 }\n        ]\n    }\n})\n```\n\n### Group status and group member label\n\n```ts\n// post a status inside a group\nawait sock.sendMessage(groupJid, {\n    groupStatus: { image: { url: './status.jpg' }, caption: 'Hello group' }\n})\n\n// set your member label in a group (max. 30 characters)\nawait sock.sendMessage(groupJid, {\n    groupLabel: 'Admin'\n})\n```\n\n`groupLabel` only works with group JIDs (`@g.us`).\n\n> [!NOTE]\n> These payloads are constructed by hand from observed WhatsApp behavior. Field names beyond the ones shown here can be found in `src/Types/Message.ts` and `src/Socket/special-messages.ts`.\n\n## Relay Options\n\n`relayMessage` accepts extra options that control which devices receive the message:\n\n| Option | Effect |\n| --- | --- |\n| `participant: { jid }` | Send only to the target's own devices, skipping your own |\n| `participants: { jid, count }` | Retry resend to a single participant (used after a decryption failure) |\n| `isSecret: true` | Send only to the target's primary device |\n| `protected: true` | Send to everything except the target's linked (secondary) devices |\n| `me: true` | Send only to your own devices |\n\n`isSecret`, `protected`, `me` and `participant` add `device_fanout: 'false'` to the stanza and have no effect in groups or status broadcasts.\n\n```ts\nawait sock.relayMessage(jid, message, {\n    messageId,\n    isSecret: true\n})\n```\n\n## Events\n\nBaileys uses an event-based architecture.\n\nCommon events include:\n\n```text\nconnection.update\ncreds.update\nmessages.upsert\nmessages.update\nmessages.delete\nmessages.reaction\nchats.upsert\nchats.update\nchats.delete\ncontacts.upsert\ncontacts.update\npresence.update\ngroups.upsert\ngroups.update\ngroup-participants.update\n```\n\nExample:\n\n```ts\nsock.ev.on('messages.upsert', ({ messages }) => {\n    console.log(messages)\n})\n```\n\n## Event Buffering\n\nFor applications that perform several operations at once, Baileys provides an event buffer mechanism through its event system.\n\nThis can help prevent unnecessary processing when multiple related events are received in a short period of time.\n\nRefer to the exported event types and implementation in this repository for the currently supported behavior.\n\n## TypeScript\n\nThis package is written in TypeScript.\n\nExample:\n\n```ts\nimport makeWASocket, {\n    WASocket,\n    proto\n} from '@hanzofc/baileys'\n\nconst sock: WASocket = makeWASocket({})\n```\n\nMessage structures are available through the exported types:\n\n```ts\nimport { proto } from '@hanzofc/baileys'\n\nconst message: proto.IWebMessageInfo = {}\n```\n\nThe available types may change between releases.\n\n## Configuration\n\nA socket can be configured using the options exported by the package.\n\nExample:\n\n```ts\nconst sock = makeWASocket({\n    auth: state,\n    printQRInTerminal: false\n})\n```\n\nFor the complete list of currently supported options, refer to the TypeScript definitions and source code in this repository.\n\n## Logging\n\nBaileys uses `pino` for logging.\n\nExample:\n\n```ts\nimport pino from 'pino'\n\nconst logger = pino({\n    level: 'silent'\n})\n\nconst sock = makeWASocket({\n    logger\n})\n```\n\nFor development:\n\n```ts\nconst logger = pino({\n    level: 'debug'\n})\n```\n\n## Proxy\n\nProxy configuration depends on the connection implementation and supported socket options.\n\nIf you need proxy support, configure the socket using the appropriate agent or connection options supported by the current release.\n\n## QR Code\n\nDepending on the authentication setup and application, you may need to display a QR code when connecting a new account.\n\nThe exact QR handling depends on the version and authentication configuration being used.\n\nExample:\n\n```ts\nsock.ev.on('connection.update', ({ qr }) => {\n    if (qr) {\n        console.log('QR:', qr)\n    }\n})\n```\n\nYou can use a QR-code library to display the QR in a terminal or application.\n\n## Pairing Code\n\nWhere supported, pairing code authentication can be used instead of scanning a QR code.\n\nExample:\n\n```ts\nconst phoneNumber = '1234567890'\n\nconst code = await sock.requestPairingCode(phoneNumber)\n\nconsole.log(code)\n```\n\nThe phone number should be provided in international format without `+`, spaces, or other formatting characters.\n\nExample:\n\n```text\n6281234567890\n```\n\nAvailability and behavior of pairing codes may change with WhatsApp and Baileys updates.\n\n## Multi-Device\n\nBaileys supports WhatsApp's multi-device architecture.\n\nAuthentication credentials are stored locally so the application can reconnect without repeatedly pairing the account.\n\nAlways protect your authentication credentials.\n\nDo not publish or share:\n\n```text\ncreds.json\nsession files\nauthentication keys\napp-state keys\n```\n\n## Security\n\nTreat your WhatsApp authentication files as sensitive credentials.\n\nDo not:\n\n* Upload authentication files to GitHub.\n* Share authentication files with other people.\n* Put authentication files inside a public web directory.\n* Include authentication credentials in logs.\n* Commit `.env` files containing secrets.\n\nA typical `.gitignore` can include:\n\n```gitignore\nauth_info_baileys/\n.env\nnode_modules/\n```\n\n## WhatsApp Compatibility\n\nBaileys communicates with WhatsApp through the WhatsApp Web protocol.\n\nWhatsApp can change its protocol, message structures, authentication mechanisms, or other behavior at any time.\n\nBecause of this, compatibility may change without notice.\n\nIf something stops working after a WhatsApp-side change, a new release or code modification may be required.\n\n## Versioning\n\nThis fork follows its own npm release versions while remaining based on the upstream Baileys codebase.\n\nThe current source is based on upstream `7.0.0-rc14`. The fork's own version (`7.0.0`) does not match upstream's version numbers, so a higher number here does not mean it contains newer upstream changes. The `CHANGELOG.md` file still contains only the upstream `7.0.0-rc14` heading.\n\nCurrent package:\n\n```text\n@hanzofc/baileys\n```\n\nExample:\n\n```bash\nnpm install @hanzofc/baileys@7.0.0\n```\n\nFor projects using the `baileys` alias:\n\n```bash\nnpm install baileys@npm:@hanzofc/baileys@7.0.0\n```\n\n### Release model\n\nSource changes are maintained on GitHub:\n\n```text\nhttps://github.com/harissfx/Baileys3\n```\n\nPublished releases are available on npm:\n\n```text\nhttps://www.npmjs.com/package/@hanzofc/baileys\n```\n\nGitHub commits do not automatically change an already published npm version.\n\n## Development\n\nClone the repository:\n\n```bash\ngit clone https://github.com/harissfx/Baileys3.git\n```\n\nEnter the directory:\n\n```bash\ncd Baileys3\n```\n\nInstall dependencies:\n\n```bash\nnpm install\n```\n\nBuild the project:\n\n```bash\nnpm run build\n```\n\nThe available scripts can be checked with:\n\n```bash\nnpm run\n```\n\n## Using the Local Repository\n\nIf you are developing against the local source instead of the published npm package, you can use a local dependency:\n\n```json\n{\n    \"dependencies\": {\n        \"baileys\": \"file:./Baileys3\"\n    }\n}\n```\n\nThis is useful when testing changes before publishing a new npm version.\n\nFor normal production use, installing the published package is recommended:\n\n```bash\nnpm install @hanzofc/baileys\n```\n\n## Contributing\n\nIssues, bug reports, and pull requests are welcome.\n\nBefore opening an issue, please check whether the problem is caused by:\n\n* WhatsApp-side changes\n* An authentication/session problem\n* A dependency problem\n* A configuration issue\n* A bug specific to this fork\n\nWhen reporting a bug, include:\n\n* Node.js version\n* Package version\n* Operating system\n* Relevant error message\n* Minimal reproduction when possible\n\nDo not include authentication credentials or private WhatsApp session files.\n\n## Upstream\n\nThis project is based on **Baileys**, originally developed and maintained by contributors in the upstream project.\n\nUpstream repository:\n\nhttps://github.com/WhiskeySockets/Baileys\n\nUpstream documentation:\n\nhttps://baileys.wiki\n\nThis fork does not claim to be the official Baileys repository.\n\nFor upstream-specific issues, documentation, or changes, refer to the upstream project.\n\n## Credits\n\nSpecial thanks to the contributors and maintainers of the original Baileys project.\n\nThis fork would not exist without the work of the upstream Baileys community.\n\nOriginal project:\n\nhttps://github.com/WhiskeySockets/Baileys\n\nParts of the additional functionality in this fork were ported from other Baileys forks:\n\n* `wbails` (Baileys2 / `@qwerty-xcv/baileys`): special message types\n* `@poucode/baileys`: `biz` / `native_flow` nodes for interactive and product messages\n* `@vansnowi/baileys`: `richMenu`, `sendHtml`, `useSqliteAuthState`\n\n## Disclaimer\n\nThis project is an independent fork and is not affiliated with, endorsed by, or officially supported by WhatsApp.\n\nWhatsApp is a trademark of Meta Platforms, Inc.\n\nUse this library responsibly and comply with applicable laws, regulations, and WhatsApp's terms and policies.\n\nThe maintainers of this fork are not responsible for account restrictions, bans, data loss, or other consequences resulting from the use of this software.\n\n## Documentation\n\nFor detailed API information, examples, and exported types, refer to:\n\n* This repository\n* The source code\n* TypeScript definitions\n* Upstream Baileys documentation where applicable\n\nUpstream documentation:\n\nhttps://baileys.wiki\n\n## License\n\nThis project retains the licensing terms of the upstream Baileys project.\n\nSee the repository's `LICENSE` file for the complete license text.\n\nCopyright and attribution notices from the original project must be preserved where required.\n\n---\n\n<div align=\"center\">\n\n**@hanzofc/baileys**\n\nA customized fork of Baileys.\n\nGitHub: https://github.com/harissfx/Baileys3\n\nnpm: https://www.npmjs.com/package/@hanzofc/baileys\n\n</div>","readmeFilename":"README.md"}