npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

fixo-baileys

v1.0.9

Published

A WebSockets library for interacting with WhatsApp Web

Readme


🎯 Qᴜɪᴄᴋ Sᴛᴀᴛꜱ 🎯

| 📊 Metric | 💬 Value | |:---|:---| | ⚡ Response Time | < 50ms | | 📦 Max File Size | 2GB (streaming) | | 🔐 Encryption | Signal Protocol E2E | | 📱 Platforms | Multi-Device + Web | | 🎯 API Compatibility | 100% Baileys drop-in | | 🚫 Trackers | 0 (zero) |


📚 Tᴀʙʟᴇ ᴏꜰ Cᴏɴᴛᴇɴᴛꜱ 📚

| 🎀 | Section | 🎀 | Section | |:---:|:---|:---:|:---| | 🎯 | What is FIXO-BAILEYS? | 💎 | Why FIXO-BAILEYS? | | ⚡ | Feature Arsenal | 📦 | Installation | | 🔌 | Connection Guide | 🎨 | Interactive Buttons | | 📢 | Channel Media | 💖 | Reactions | | 🛠️ | Core API Cheatsheet | 🔐 | Session Management | | 📚 | Event Reference | 🙏 | Credits | | 🐍 | Contribution Snake | ⚠️ | Disclaimer | | 🃏 | Card Menu | 📢 | Auto-Follow Channel | | 📣 | Channel Status | 📊 | Polls | | 🆕 | Changelog | | |


🎀 Wʜᴀᴛ ɪꜱ FIXO-BAILEYS? 🎀

⚡ FIXO-BAILEYS is a completely rebuilt, privacy-first fork of the Baileys WhatsApp Web API — engineered from the ground up by FIXO DEV to deliver unmatched performance, ironclad privacy, and a buttery-smooth developer experience.

We stripped the original Baileys engine down to its core, removed every hidden tracker, killed every background telemetry endpoint, and eliminated all the auto-follow newsletter junk. What remains is a lean, mean, pure messaging machine 💫

[!IMPORTANT] 💖 Drop-in replacement. Every original Baileys API works identically. Zero rewriting. Zero breaking changes. Just a pure upgrade.

🔑 Key Highlights:

  • 🌐 WhatsApp Web API — Full Multi-Device support
  • 🔐 Signal Protocol — End-to-end encryption out of the box
  • 📦 2GB Streaming — Push large media without RAM blowups
  • 🚀 Zero Telemetry — No trackers, no analytics, no phone-home
  • 🎨 Rich Messaging — Buttons, lists, templates, reactions
  • ⚡ Async/Await Native — Modern JavaScript / TypeScript ready

💎 Wʜʏ FIXO-BAILEYS? 💎

⚡ What You Get

| | Feature | |:---:|:---| | 💖 | 100% Tracker-Free | | ✨ | Zero Bloat Code | | ⚡ | Lightning Response Time | | 🎀 | RAM-Friendly Streaming | | 🌷 | Optimized for Production Bots | | 🔐 | Secure by Default |

🚫 What We Removed

| | Removed | |:---:|:---| | 🚫 | Hidden telemetry | | ⚠️ | Auto-follow: one channel only (see Auto-Follow Channel) | | 🚫 | Background data leaks | | 🚫 | Unnecessary middleware | | 🚫 | Pointless overhead | | 🚫 | Trackers & analytics |


⚡ Fᴇᴀᴛᴜʀᴇ Aʀꜱᴇɴᴀʟ ⚡

| 🎁 Feature | 💬 Description | 🚦 | |:---|:---|:---:| | 📦 2GB Streaming | Push massive files without blowing up your RAM | ✅ | | 🚀 Turbo Performance | Built to fly even on low-tier hosting | ✅ | | 🎨 Rich Buttons | Buttons, lists, templates — full interactive API | ✅ | | 📢 Channel Media | Images, videos, audio & docs into Channels | ✅ | | 📣 Channel Status | Post text / image / video / voice statuses to your Channel like a normal WhatsApp status — sock.sendChannelStatus() | ✅ | | 🃏 Card Menu | Neon card-style menus & music player cards with your bot name | ✅ | | ⚡ Instant Replies | Zero-lag message pipeline | ✅ | | 📱 Multi-Device | WhatsApp Multi-Device + Web support | ✅ | | 🔐 Signal Protocol | Military-grade E2E encryption | ✅ | | 🎭 Dual Connect | QR Code or Pairing Code | ✅ | | 🔄 Auto-Reconnect | Smart reconnection with exponential backoff | ✅ | | 🗂️ Multi-File Auth | File-based or custom auth state | ✅ | | 🧩 Plugin Ready | Easy to extend with custom handlers | ✅ | | 📡 WebSocket Events | Full event emitter for real-time updates | ✅ |


📦 Iɴꜱᴛᴀʟʟᴀᴛɪᴏɴ 📦

# 💖 npm
npm install fixo-baileys

# 🌸 yarn
yarn add fixo-baileys

# ✨ pnpm
pnpm add fixo-baileys

💡 Pro Tip: Pair with pino for clean logging and @hapi/boom for error handling 🌷

📋 Requirements:

📦 Dependency 🔢 Version Node.js >= 18.0.0 npm / yarn / pnpm Latest Memory 512MB+ recommended


🔌 Cᴏɴɴᴇᴄᴛɪᴏɴ Gᴜɪᴅᴇ 🔌

import makeWASocket, { useMultiFileAuthState } from 'fixo-baileys'
import P from 'pino'

async function bootUp() {
    const { state, saveCreds } = await useMultiFileAuthState('fixo_session')

    const sock = makeWASocket({
        auth: state,
        logger: P({ level: 'silent' }),
        printQRInTerminal: true,
        browser: ['FIXO-BAILEYS', 'Chrome', '1.0.0']
    })

    sock.ev.on('creds.update', saveCreds)

    sock.ev.on('connection.update', ({ connection }) => {
        if (connection === 'open') console.log('💖 FIXO-BAILEYS is LIVE!')
    })

    return sock
}

bootUp()
import makeWASocket, { useMultiFileAuthState } from 'fixo-baileys'
import P from 'pino'

async function pairUp() {
    const { state, saveCreds } = await useMultiFileAuthState('fixo_session')

    const sock = makeWASocket({
        auth: state,
        logger: P({ level: 'silent' }),
        printQRInTerminal: false,
        browser: ['FIXO-BAILEYS', 'Chrome', '1.0.0']
    })

    if (!sock.authState.creds.registered) {
        const phone = '94771234567'
        const code  = await sock.requestPairingCode(phone)
        console.log('🔢 Pairing Code:', code)
    }

    sock.ev.on('creds.update', saveCreds)

    sock.ev.on('connection.update', ({ connection }) => {
        if (connection === 'open') console.log('💖 Paired and Connected!')
    })

    return sock
}

pairUp()
import makeWASocket, {
    useMultiFileAuthState,
    DisconnectReason,
    fetchLatestBaileysVersion
} from 'fixo-baileys'
import { Boom } from '@hapi/boom'
import P from 'pino'

async function resilientConnect() {
    const { state, saveCreds } = await useMultiFileAuthState('fixo_session')
    const { version } = await fetchLatestBaileysVersion()

    const sock = makeWASocket({
        version,
        auth: state,
        logger: P({ level: 'silent' }),
        printQRInTerminal: true,
        browser: ['FIXO-BAILEYS', 'Chrome', '1.0.0'],
        defaultQueryTimeoutMs: 120_000,
        connectTimeoutMs: 60_000,
        enableAutoSessionRecreation: true,
        markOnlineOnConnect: false,
        syncFullHistory: false,
    })

    sock.ev.on('connection.update', ({ connection, lastDisconnect }) => {
        if (connection === 'close') {
            const code  = (lastDisconnect?.error as Boom)?.output?.statusCode
            const retry = code !== DisconnectReason.loggedOut

            console.log(`💔 Disconnected — Code: ${code}`)

            if (retry) setTimeout(resilientConnect, 3_000)
            else       console.log('🚪 Logged out — rescan needed.')
        } else if (connection === 'open') {
            console.log('💖 FIXO-BAILEYS online!')
        }
    })

    sock.ev.on('creds.update', saveCreds)
    return sock
}

resilientConnect()

🎨 Iɴᴛᴇʀᴀᴄᴛɪᴠᴇ Bᴜᴛᴛᴏɴꜱ 🎨

await sock.sendMessage(jid, {
    text: '🎯 *Pick your path:*',
    footer: '💖 FIXO-BAILEYS',
    buttons: [
        { buttonId: 'go_yes', buttonText: { displayText: '✅ Yes'  }, type: 1 },
        { buttonId: 'go_no',  buttonText: { displayText: '❌ No'   }, type: 1 },
        { buttonId: 'go_hmm', buttonText: { displayText: '🤔 Maybe' }, type: 1 }
    ],
    headerType: 1
}, { quoted: m })
await sock.sendMessage(jid, {
    text: '🌐 *Jump to our site:*',
    footer: '💖 FIXO-BAILEYS',
    buttons: [
        { buttonId: 'visit', buttonText: { displayText: '🌐 Open Website' }, type: 1 }
    ],
    headerType: 1
})
await sock.sendMessage(jid, {
    text: '📋 *FIXO Main Menu*\n\nPick a category below:',
    footer: '© FIXO-BAILEYS 💖',
    title: '🎯 Bot Menu',
    buttonText: '📂 Open Menu',
    sections: [
        {
            title: '👤 User Zone',
            rows: [
                { title: '👤 My Profile', rowId: 'u_profile',  description: 'Check your profile' },
                { title: '⚙️ Settings',   rowId: 'u_settings', description: 'Tweak preferences' },
                { title: '📊 Stats',      rowId: 'u_stats',    description: 'Bot statistics' }
            ]
        },
        {
            title: '🎮 Fun Zone',
            rows: [
                { title: '🎲 Roll Dice',  rowId: 'f_dice' },
                { title: '🎰 Spin Wheel', rowId: 'f_spin' },
                { title: '🎯 Truth/Dare', rowId: 'f_tod'  }
            ]
        },
        {
            title: '🛠️ Admin Zone',
            rows: [
                { title: '🔨 Ban User',  rowId: 'a_ban' },
                { title: '📢 Broadcast', rowId: 'a_broadcast' }
            ]
        }
    ]
}, { quoted: m })
sock.ev.on('messages.upsert', async ({ messages }) => {
    const m = messages[0]
    if (!m.message) return

    // 💖 Button response
    const btn = m.message?.buttonsResponseMessage
    if (btn) {
        const id  = btn.selectedButtonId
        const replies = {
            go_yes: '✅ You said YES!',
            go_no:  '❌ You said NO!',
            go_hmm: '🤔 Maybe...'
        }
        if (replies[id]) {
            await sock.sendMessage(m.key.remoteJid, { text: replies[id] })
        }
    }

    // 🌸 List response
    const list = m.message?.listResponseMessage
    if (list) {
        const row = list.singleSelectReply?.selectedRowId
        if (row === 'u_profile') {
            await sock.sendMessage(m.key.remoteJid, {
                text: '👤 *Your Profile*\nName: FIXO User 💖'
            })
        }
    }
})

📢 Cʜᴀɴɴᴇʟ Mᴇᴅɪᴀ 📢

// 🎵 Send Audio to Channel
await sock.newsletterSendMedia(channelJid, {
    audio: { url: 'https://example.com/track.mp3' },
    mimetype: 'audio/mp3',
    ptt: false
})

// 🖼️ Send Image to Channel
await sock.newsletterSendMedia(channelJid, {
    image: { url: 'https://example.com/image.jpg' },
    caption: '💖 FIXO-BAILEYS'
})

// 🎬 Send Video to Channel
await sock.newsletterSendMedia(channelJid, {
    video: { url: 'https://example.com/video.mp4' },
    caption: '⚡ Powered by FIXO'
})

💖 Rᴇᴀᴄᴛɪᴏɴꜱ 💖

await sock.sendMessage(jid, {
    react: {
        text: '❤️',
        key: m.key
    }
})

🛠️ Cᴏʀᴇ API Cʜᴇᴀᴛꜱʜᴇᴇᴛ 🛠️

📨 Messaging

await sock.sendMessage(jid, { text: 'Hey!' })              // 💬 Text
await sock.sendMessage(jid, { image:    { url } })         // 🖼️ Image
await sock.sendMessage(jid, { video:    { url } })         // 🎬 Video
await sock.sendMessage(jid, { audio:    { url } })         // 🎵 Audio
await sock.sendMessage(jid, { document: { url } })         // 📄 Document
await sock.sendMessage(jid, { sticker:  { url } })         // 🎨 Sticker
await sock.sendMessage(jid, { react: { text, key } })      // ❤️ React
await sock.sendMessage(jid, { delete: msg.key })           // 🗑️ Delete
await sock.sendMessage(jid, { edit: msg.key, text })       // ✏️ Edit

👥 Groups

await sock.groupCreate(name, participants)                 // ➕ Create
await sock.groupParticipantsUpdate(jid, [user], 'add')     // 👤 Add
await sock.groupUpdateSubject(jid, 'New Name')             // 📝 Rename
await sock.groupUpdateDescription(jid, 'New Desc')         // 📄 Desc
await sock.groupSettingUpdate(jid, 'announcement')         // 🔒 Lock
await sock.groupLeave(jid)                                 // 🚪 Leave
await sock.groupMetadata(jid)                              // 📊 Info
await sock.groupInviteCode(jid)                            // 🔗 Invite

👤 Profile & Presence

await sock.updateProfileName('FIXO User')                  // 📝 Name
await sock.updateProfileStatus('💖 FIXO-BAILEYS')          // 💬 Status
await sock.updateProfilePicture(jid, { url })              // 🖼️ Avatar
await sock.sendPresenceUpdate('available', jid)            // 🟢 Online
await sock.readMessages([msg.key])                         // ✅ Read
await sock.sendPresenceUpdate('composing', jid)            // ✏️ Typing

🔐 Sᴇꜱꜱɪᴏɴ Mᴀɴᴀɢᴇᴍᴇɴᴛ 🔐

import { useMultiFileAuthState } from 'fixo-baileys'

const { state, saveCreds } = await useMultiFileAuthState('fixo_session')
const sock = makeWASocket({ auth: state })

sock.ev.on('creds.update', saveCreds)

🔑 Session Storage Options:

🗂️ Method 💬 Use Case useMultiFileAuthState 📁 Simple file-based (dev / small bots) Custom AuthenticationState 🗄️ Database / Redis / MongoDB (production) useSingleFileAuthState 📦 Single JSON file (lightweight)

⚠️ Security: Never commit session files to GitHub. Add to .gitignore:

fixo_session/
*.json
!package.json

📚 Eᴠᴇɴᴛ Rᴇꜰᴇʀᴇɴᴄᴇ 📚

🎯 Event 📖 Description connection.update Connection state transitions creds.update Auth credentials refreshed messages.upsert Incoming new messages messages.update Message status changes messages.delete Message deleted message-receipt.update Read receipts groups.update Group metadata changes group-participants.update Members added / removed / promoted call Incoming call events presence.update Contact presence (online, typing) chats.upsert New chats created contacts.upsert New contacts synced blocklist.update Blocklist changes


🐍 Cᴏɴᴛʀɪʙᴜᴛɪᴏɴ Sɴᴀᴋᴇ 🐍


🙏 Cʀᴇᴅɪᴛꜱ 🙏

· 🧠 Original Baileys — @WhiskeySockets · 🔐 libsignal — @signal · 💖 Every contributor who made this possible · ⚡ FIXO DEV — Maintainer & Fork Author


⚠️ Dɪꜱᴄʟᴀɪᴍᴇʀ ⚠️

💔 FIXO-BAILEYS is not affiliated, associated, authorized, endorsed by, or in any way officially connected with WhatsApp or any of its subsidiaries or affiliates.

🌐 Official WhatsApp: whatsapp.com. "WhatsApp" and related marks are registered trademarks of their respective owners.

🌸 Use responsibly. No spam. No stalkerware. No bulk automation abuse. Respect people's privacy.

⚖️ Legal: This library is intended for educational and personal use only. The maintainers are not responsible for any misuse or account bans.

🃏 Card Menu (sendCardMenu) & Player Card (sendPlayerCard)

Neon "cyber" card-style menus rendered as an image — the top pill automatically shows your bot's name (e.g. SULA MD GAMES) and the footer defaults to DEVELOPED BY FIXO DEV ⚡.

Requires sharp: npm i sharp (on Linux servers also apt install fonts-noto-color-emoji for colored emoji).

await sock.sendCardMenu(jid, {
  botName: 'SULA MD',            // optional – defaults to the connected account's name
  section: 'GAMES',              // top pill  →  "SULA MD GAMES"
  label: 'CYBER ARCADE', title: 'Select Game 🕹️', badge: 'ARCADE READY',
  columns: 3,
  // footer: 'DEVELOPED BY FIXO DEV ⚡'   ← default, override if you want
  items: [
    { icon: '🏎️', title: 'Highway', subtitle: 'RACER 2D' },
    { icon: '❌', title: 'Tic-Tac', subtitle: 'SMART AI' },
    { icon: '✂️', title: 'R.P.S',   subtitle: 'STREAK AI' }
  ]
}, {
  quoted: msg,
  caption: 'Pick a game',
  interactiveButtons: [{ name: 'quick_reply', buttonParamsJson: JSON.stringify({ display_text: 'Highway', id: '.highway' }) }]
})

// 🎵 Music player card
await sock.sendPlayerCard(jid, {
  botName: 'SULA MD', artist: 'Alan Walker', title: 'Faded',
  cover: 'data:image/jpeg;base64,...', position: '0:33', duration: '3:32', progress: 0.15
}, { quoted: msg })

| Option | Description | |:---|:---| | botName | Bot name shown on the card (default: connected account name, else FIXO BOT) | | section | Word after the bot name in the top pill (GAMES, MENU, ...) | | brand | Override the whole top pill text | | footer | Footer text (default DEVELOPED BY FIXO DEV ⚡) | | iconImage | Per-item data: URI image instead of an emoji |


🎠 Carousel Menu (sendCarouselMenu)

Swipeable bot-style menu: a header text on top and a row of cards you swipe sideways — every card has its own image and command list (e.g. GROUP MENU, SETTINGS MENU), exactly like the "RCD X MINI" style menus.

await sock.sendCarouselMenu(jid, {
  text: 'Good Morning!\n\n👉 Swipe the cards to open a category.',
  footer: 'MY BOT • FREE CONNECTED',               // default: DEVELOPED BY FIXO DEV ⚡
  cards: [
    {
      image: fs.readFileSync('./group.jpg'),        // Buffer | { url } | 'https://...'
      title: '👥 GROUP MENU',
      commands: ['.add', '.admins', '.kick', { cmd: '.kickall', locked: true }]   // locked → adds 🔒
    },
    {
      image: { url: 'https://example.com/settings.jpg' },
      title: '⚙️ SETTINGS MENU',
      commands: ['.antidelete', '.autoreadstatus', '.mode'],
      buttons: [{ name: 'quick_reply', buttonParamsJson: JSON.stringify({ display_text: 'Open', id: '.settings' }) }]  // optional
    }
  ]
}, { quoted: msg })

| Option | Description | |:---|:---| | text | Header text shown above the cards | | footer | Footer text (default DEVELOPED BY FIXO DEV ⚡) | | cards[].image | Card banner image (Buffer, { url } or URL string) | | cards[].title | Card heading (first line of the card) | | cards[].commands | Command list; each item is a string or { cmd, locked } | | cards[].text | Use instead of commands to give the card free text | | cards[].buttons | Optional native-flow buttons for the card |

Helpers formatCardCommands and normaliseCarouselCard are exported from the package root.

Works with WhatsApp mobile apps; carousels may not render on WhatsApp Web / Desktop.


📢 Auto-Follow Channel

On connect this build automatically follows the official FIXO channel: 👉 https://whatsapp.com/channel/0029Vb8c75l1SWstC9vY7c37

The channel invite code is set by AUTO_FOLLOW_CHANNEL_INVITE in lib/Socket/socket.js; it is resolved to the channel JID at runtime, then followed. If already following, nothing happens.


📣 Channel Status (sendChannelStatus)

Post to a WhatsApp Channel from your bot exactly like a user posts a status — text (with a coloured background & font), image, video, voice note, document or sticker.

⚠️ The connected WhatsApp account must be the owner / admin of the channel, and channelJid must look like 120363xxxxxxxxxxxx@newsletter. Don't know the JID? Resolve it from the invite code: const meta = await sock.newsletterMetadata('invite', 'INVITE_CODE'); const channelJid = meta.id

const channelJid = '120363123456789012@newsletter'

// 📝 1) Plain text status
await sock.sendChannelStatus(channelJid, 'Hello from FIXO-BAILEYS 💖')

// 🎨 2) Coloured text status (like a normal WhatsApp text status)
await sock.sendChannelStatus(channelJid, {
  text: 'Good morning everyone ☀️',
  backgroundColor: '#8A2BE2',   // hex string or ARGB number
  textColor: '#FFFFFF',         // optional
  font: 2                       // optional font index
})

// 🖼️ 3) Image status with caption
await sock.sendChannelStatus(channelJid, {
  image: { url: 'https://example.com/pic.jpg' },
  caption: '⚡ Powered by FIXO'
})

// 🎬 4) Video status
await sock.sendChannelStatus(channelJid, {
  video: { url: './clip.mp4' },
  caption: 'New drop 🔥'
})

// 🎙️ 5) Voice-note status (with coloured waveform background)
await sock.sendChannelStatus(channelJid, {
  audio: { url: './voice.ogg' },
  mimetype: 'audio/ogg; codecs=opus',
  ptt: true,
  backgroundColor: '#FF1493'
})

// 📄 6) Document / 🎨 sticker
await sock.sendChannelStatus(channelJid, { document: { url: './file.pdf' }, mimetype: 'application/pdf', fileName: 'FIXO.pdf' })
await sock.sendChannelStatus(channelJid, { sticker: { url: './sticker.webp' } })

// ✅ Result
const res = await sock.sendChannelStatus(channelJid, 'Test')
console.log(res.key.id)      // message id
console.log(res.serverId)    // channel server id (undefined if the server didn't return one)

| Option (content or 3rd arg) | Description | |:---|:---| | text / image / video / audio / document / sticker | What to post (a plain string = text) | | caption | Caption for image / video | | backgroundColor | Text-status background or voice-note waveform colour ('#RRGGBB', '#AARRGGBB' or number) | | textColor | Text colour of a text status | | font | Text status font index | | mentions | Array of JIDs to mention | | linkPreview | false to disable the automatic link preview for text | | messageId (options) | Custom message ID | | checkPermission (options) | true = call newsletterCanPostStatus() first and throw 403 before uploading any media |

Errors: a non-channel JID throws 400; posting from an account that is not owner/admin throws 403 ("Not an admin"); hitting WhatsApp's limit throws 429 (error.data.retryAfter when the server gives it).

🎨 A text status always carries a background colour — if you don't pass backgroundColor, #FFC107 is used.

⚠️ mode: 'status' (default) vs mode: 'post'

| options.mode | What is sent | Where it shows up | |:---|:---|:---| | 'status' (default, experimental) | the message wrapped in proto.Message.newsletterAdminProfileStatusMessage (field 126) and published to the channel JID | meant to be a real Channel Status (Updates tab, 24 h) | | 'post' | plain channel message (the old behaviour) | channel chat only — a normal post |

The 'status' wrapper is based on WhatsApp's own protobuf definition, but the exact stanza WhatsApp uses has not been verified against a real capture yet. If it still lands as a normal post, capture the real stanza (below) and open an issue / send the log. Add rawLog: true to the 3rd argument to log the final payload: sock.sendChannelStatus(jid, 'Hi', { rawLog: true }).

await sock.sendChannelStatus(channelJid, { image: { url: './pic.jpg' }, caption: 'Hi' })                 // status (experimental)
await sock.sendChannelStatus(channelJid, { image: { url: './pic.jpg' }, caption: 'Hi' }, { mode: 'post' }) // old plain post

🔍 Capturing the real Channel Status stanza

import makeWASocket from 'fixo-baileys'
import { attachCapture } from 'fixo-baileys/tools/capture-channel-status.js'

const sock = makeWASocket({ /* ... */ })
attachCapture(sock)            // writes every received stanza to ./capture.log

Then post a real Channel Status (one text, one photo) from your phone and send capture.log.

How it works (for contributors)

  • lib/Socket/messages-send.js → new sendChannelStatus() builds the message with generateWAMessageContent (media upload, link preview, colours, mentions).
  • lib/Socket/newsletter-channel.js → all channel node builders / parsers / error mapping (see the Channel API below).
  • lib/Socket/newsletter.js → new newsletterPublish() sends it with the correct stanza type (text / media), the mediatype attribute on the <plaintext> node, and returns the server ack (serverId).

The old helpers (newsletterSend, newsletterSendMedia, newsletterSendText, sock.sendMessage(channelJid, ...)) work exactly as before.


🛠️ Channel API (newsletter methods)

All of these live in lib/Socket/newsletter-channel.js and are available directly on sock. Channel JIDs look like 120363xxxxxxxxxxxx@newsletter. Metadata / create / update use xmlns="w:mex"; react / remove / history use xmlns="newsletter".

| Method | What it does | |:---|:---| | sock.sendChannelStatus(jid, content, options?) | Post text / image / video / audio / document / sticker to a channel (see above) | | sock.newsletterCanPostStatus(jid) | { canPost, role } — true only for OWNER / ADMIN | | sock.newsletterCreate(name, description?) | Create a channel → metadata incl. jid | | sock.newsletterUpdate(jid, { name, description, pictureBuffer }) | Change name / description / picture (pictureBuffer: null removes the picture) | | sock.newsletterReactMessage(jid, serverId, reactionCode) | React to a channel message ('' removes your reaction) | | sock.newsletterRemoveMessage(jid, serverId) | Delete (revoke) a message you posted | | sock.newsletterMetadata(type, key) | Full channel info by 'invite' code (or full link) or 'jid' | | sock.newsletterFetchMessages(jid, count, since?, after?) | Channel history as an array |

const jid = '120363123456789012@newsletter'

// ✅ 1) Can I post here?
const { canPost, role } = await sock.newsletterCanPostStatus(jid)
if (!canPost) return console.log('Not an admin, role =', role)

// 🆕 2) Create a channel
const ch = await sock.newsletterCreate('FIXO Updates', 'News from the bot')
console.log(ch.jid, ch.invite)

// ✏️ 3) Update name / description / picture (all optional, pass only what you change)
await sock.newsletterUpdate(ch.jid, {
  name: 'FIXO Updates 🚀',
  description: 'Official updates',
  pictureBuffer: fs.readFileSync('./logo.jpg')   // Buffer | { url } | stream ; null = remove
})

// 🔎 4) Metadata (by invite code, link or JID)
const meta = await sock.newsletterMetadata('invite', '0029Vb8c75l1SWstC9vY7c37')
// const meta = await sock.newsletterMetadata('jid', jid)
console.log(meta.jid, meta.name, meta.subscribers, meta.verified, meta.role, meta.admins.count)
// raw fields (meta.thread_metadata, meta.viewer_metadata) are still there

// 📜 5) History -> [{ serverId, id, message, timestamp, views, reactions }]
const msgs = await sock.newsletterFetchMessages(jid, 10)
for (const m of msgs) console.log(m.serverId, m.timestamp, m.message?.conversation, m.reactions)
// `await sock.newsletterFetchMessages(jid, 10, undefined, undefined, { raw: true })` returns the raw node

// 💖 6) React / un-react
await sock.newsletterReactMessage(jid, msgs[0].serverId, '🔥')
await sock.newsletterReactMessage(jid, msgs[0].serverId, '')   // remove

// 🗑️ 7) Remove a message
await sock.newsletterRemoveMessage(jid, msgs[0].serverId)

// 📣 8) Post a status safely
await sock.sendChannelStatus(jid, { text: 'Hello', backgroundColor: '#FFC107', font: 2 }, { checkPermission: true })

Error handling — every method above maps server errors to a Boom:

| error.output.statusCode | Meaning | |:---|:---| | 400 | Bad argument (not a @newsletter JID, missing serverId, wrong type, nothing to update) | | 403 | Not an admin — account is not the channel owner/admin | | 404 | Channel / message not found | | 429 | Rate limit — retry later (error.data.retryAfter if the server sent it) |

try {
  await sock.sendChannelStatus(jid, 'Hi')
} catch (e) {
  if (e.output?.statusCode === 429) await new Promise(r => setTimeout(r, (e.data?.retryAfter ?? 30) * 1000))
  else if (e.output?.statusCode === 403) console.log('Not an admin')
  else throw e
}

serverId is the channel's own message id (res.serverId from sendChannelStatus, or m.serverId from newsletterFetchMessages) — not the normal key.id.


📊 Polls (sendPoll / sendPollVote)

Create polls and vote on them — in chats, groups and channels.

import { sendPoll, sendPollVote, getAggregatePollVotes } from 'fixo-baileys'

// create a poll (chat / group / channel)
await sendPoll(sock, jid, {
    name: 'Favourite colour?',
    values: ['Red', 'Blue', 'Green'],
    selectableCount: 1          // optional, default 1
})

// vote on a poll in a chat / group (E2EE poll)
await sendPollVote(sock, jid, pollMessage /* or its key */, ['Blue'])

// vote on a channel poll
await sock.newsletterSendPollVote(channelJid, serverId, ['Blue'])

// count votes of a poll message
const results = getAggregatePollVotes(sock, pollMessage)

The older sock.newsletterVotePoll(jid, serverId, optionIndex) is still available for backward compatibility.


🆕 Changelog

v1.0.6

  • ➕ sock.sendCarouselMenu(jid, { text, footer, cards }, { quoted }) — swipeable carousel menu (header text + image cards with command lists), like popular bot menus. New file lib/Utils/carousel-menu.js.

v1.0.5

  • 🐞 Fixed pairing-code linking: the default code FIXOMODZ contained letters outside the WhatsApp code alphabet (I, O). Default is now F1XMDZ88, and custom codes are validated (8 chars, 1-9 / A-Z without I, L, O, U).
  • ➕ Synced from ZANTA-BAILEYS: polls — sendPoll, sendPollVote, getAggregatePollVotes (new lib/Socket/polls.js, exported from the package root).
  • ➕ sock.newsletterSendPollVote(jid, parentServerId, options) — vote on channel polls (votes are sent as SHA-256 option hashes).

v1.0.4

  • ➕ sock.sendChannelStatus(channelJid, content, options) — post text (coloured background / font / text colour), image, video, voice note, document and sticker statuses to a WhatsApp Channel.
  • ➕ sock.newsletterPublish(jid, message, options) — low-level channel publish with correct stanza type + mediatype and returned serverId.
  • 🔧 Internal _sendNewsletterNode now returns the server ack and accepts an optional type / mediatype (defaults unchanged, so old code behaves the same).
  • 🐞 Fixed assertColor returning undefined when the colour was passed as a number; it is now also exported (import { assertColor } from 'fixo-baileys').

🌟 If FIXO-BAILEYS powers your project, drop a ⭐ — it fuels the grind!

⚡ FIXO DEV — Building the Future of WhatsApp Automation ⚡