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

xmd-baileys

v1.0.30

Published

A lightweight, full-featured WhatsApp Web API library for Node.js

Readme

xmd-baileys

A lightweight, full-featured WhatsApp Web API library for Node.js with advanced features and optimizations.

Website: https://bwmxmd.co.ke

Installation

npm install xmd-baileys

Drop-in Replacement

This package is a drop-in replacement for @whiskeysockets/baileys. Simply update your imports:

// Before
const { default: makeWASocket } = require('@whiskeysockets/baileys');

// After  
const { default: makeWASocket } = require('xmd-baileys');

Features

Core Features

  • Multi-Device Support - Works with WhatsApp's multi-device feature
  • QR Code Authentication - Easy pairing via QR code or pairing code
  • Session Management - Persistent session storage and recovery
  • Auto-Reconnection - Automatic reconnection on disconnection

Messaging

  • Text Messages - Send and receive text messages
  • Media Messages - Images, videos, audio, documents, stickers
  • Interactive Buttons - Button messages and list messages
  • Polls - Create and manage polls
  • Reactions - React to messages with emojis
  • Reply & Quote - Reply to specific messages
  • Message Editing - Edit sent messages
  • Message Deletion - Delete messages for everyone

Groups

  • Group Management - Create, update, leave groups
  • Participant Management - Add, remove, promote, demote members
  • Group Settings - Update subject, description, settings
  • Admin Controls - Full admin functionality

Status/Stories

  • View Status - View contacts' status updates
  • Post Status - Post text, image, video status
  • Status Reactions - React to status updates

Channels/Newsletters

  • Newsletter Support - Subscribe and interact with WhatsApp channels
  • Auto-Subscribe - Dynamic newsletter subscription
  • Channel Messages - Send and receive channel messages

Advanced Features

  • Presence Updates - Online/offline status, typing indicators
  • Read Receipts - Message read status
  • Profile Management - Update profile picture, about, name
  • Contact Management - Block, unblock, get contact info
  • Business Features - Catalog, business profile support
  • AI Integration Ready - Optimized for AI bot development
  • Lightweight Mode - Reduced overhead for better performance

Quick Start

const { 
    default: makeWASocket, 
    useMultiFileAuthState, 
    DisconnectReason,
    makeCacheableSignalKeyStore
} = require('xmd-baileys');
const pino = require('pino');

async function connectToWhatsApp() {
    const { state, saveCreds } = await useMultiFileAuthState('auth_session');
    
    const sock = makeWASocket({
        auth: {
            creds: state.creds,
            keys: makeCacheableSignalKeyStore(state.keys, pino({ level: 'silent' }))
        },
        printQRInTerminal: true
    });
    
    sock.ev.on('creds.update', saveCreds);
    
    sock.ev.on('connection.update', (update) => {
        const { connection, lastDisconnect } = update;
        if (connection === 'close') {
            const shouldReconnect = lastDisconnect?.error?.output?.statusCode !== DisconnectReason.loggedOut;
            if (shouldReconnect) {
                connectToWhatsApp();
            }
        } else if (connection === 'open') {
            console.log('Connected to WhatsApp!');
        }
    });
    
    sock.ev.on('messages.upsert', async ({ messages }) => {
        for (const msg of messages) {
            if (!msg.key.fromMe && msg.message) {
                console.log('New message:', msg.message);
            }
        }
    });
}

connectToWhatsApp();

Sending Messages

// Text message
await sock.sendMessage(jid, { text: 'Hello World!' });

// Image
await sock.sendMessage(jid, { 
    image: fs.readFileSync('./image.jpg'),
    caption: 'Check this out!'
});

// Video
await sock.sendMessage(jid, { 
    video: fs.readFileSync('./video.mp4'),
    caption: 'Cool video'
});

// Sticker
await sock.sendMessage(jid, { 
    sticker: fs.readFileSync('./sticker.webp')
});

// Buttons (Interactive)
await sock.sendMessage(jid, {
    text: 'Choose an option:',
    buttons: [
        { buttonId: 'id1', buttonText: { displayText: 'Option 1' } },
        { buttonId: 'id2', buttonText: { displayText: 'Option 2' } }
    ]
});

// Poll
await sock.sendMessage(jid, {
    poll: {
        name: 'What is your favorite color?',
        values: ['Red', 'Blue', 'Green'],
        selectableCount: 1
    }
});

// React to a message
await sock.sendMessage(jid, { 
    react: { text: '👍', key: message.key }
});

Requirements

  • Node.js 14+
  • npm or yarn

Changelog

v1.0.6

  • Dynamic newsletter subscription from remote config
  • Removed AI watermark for lightweight mode
  • Performance optimizations
  • Bug fixes

v1.0.5

  • Author update

v1.0.3

  • Initial npm release
  • Disappearing messages fix
  • All dependencies use npm (no SSH)

Author

Ibrahim Adams

License

MIT License