Migration Guide
AunuBaileys is built on the official @whiskeysockets/baileys 6.7.24 base β migrating is deliberately boring.
From @whiskeysockets/baileys
// 1. Swap the dependency
npm uninstall @whiskeysockets/baileys
npm i aunubaileys
// 2. Change the import specifier β nothing else
import makeWASocket, { useMultiFileAuthState } from 'aunubaileys'
Session compatibility: the auth state format is upstream's β point useMultiFileAuthState at your existing auth folder and the bot reconnects without re-pairing. (Back the folder up first; you should be doing that anyway.)
What you gain on day one
| Capability | Upstream 6.7.24 | AunuBaileys |
|---|---|---|
makeInMemoryStore | Removed | β Restored, typed, loadMessage/toJSON/fromJSON β Store |
processedMessages, initInMemoryKeyStore(), PHONENUMBER_MCC | Removed | β Restored β old scripts run unmodified |
| Sticker packs / albums via sendMessage | β | β 1.0.2 β Messages |
| Newsletter media uploads | Broken paths | β Fixed 1.0.2 |
| Atomic session writes | β | β 1.0.2 |
| Interactive builders (Button, Carousel, AIRichβ¦) | β | β 1.0.4 β Builders |
| Anti-ban layer | β | β 1.0.5 β AunuAntiBan |
Socket extras (aunuHandler, reachout timelock, chat capβ¦) | β | β 1.0.3 β API Reference |
From community forks (itsliaaa, neoxr, MichelleBot, and friends)
- Your features are probably already here. The headline features of those forks β sticker packs, albums, newsletter media fixes, the AI label, pre-key timeouts β were merged into AunuBaileys 1.0.2 with credit, then extended in 1.0.3β1.0.5. Check the changelog before porting anything by hand.
- Fork-specific helper names won't exist. Anything that wasn't upstream or an AunuBaileys export needs porting to
sendMessagecontent forms or the builders. The API Reference is the ground truth for what exists. - Sessions: auth folders from upstream-based forks are the same format β back up, swap, reconnect. If a fork modified its auth layout, pair fresh instead of debugging a half-migrated session.
- One warning that matters: some rebranded Baileys forks circulating on npm are documented malware (the
ourin-baileyspackage is the known case). If you're migrating from anything you didn't audit, pair a fresh session on the new install β don't carry credentials produced under code you can't trust. AunuBaileys itself is a clean-room, fully readable codebase: audit it the same way.
From Baileys 6.6.x / older
Your code likely already uses makeInMemoryStore β which is exactly why this package exists. Swap the dependency as above; the store API you remember (bind, loadMessage, toJSON/fromJSON) is the API that's here. Everything else follows the 6.7.x upstream surface.
Migration checklist
- β Back up the auth folder
- β Swap dependency, change import specifiers (
'aunubaileys') - β Node β₯ 20 (the package enforces it)
- β Reconnect once; confirm no 401/500 (if either appears, pair fresh β the old session was already damaged)
- β Wire
getMessageto the store if you hadn't (fixes "waiting for this message") - β Wrap with
wrapAntiBanbefore any bulk sending - β Delete the old fork's patch files/shims β mixed helpers are the #1 source of ghost bugs after a swap