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

@nozezlab/baileys

v1.0.0

Published

Premium drop-in replacement for '@whiskeysockets/baileys' featuring native interactive buttons, single-select submenus, automated phone pairing, and high-performance message serialization.

Readme

@nozezlab/baileys 🚀

Customized premium wrapper for @whiskeysockets/baileys featuring native flow interactive buttons, single-select dropdown submenus, quick phone pairing, and automatic message serialization helper functions.

Designed as a 100% compatible, drop-in replacement!


📦 Installation

To install this customized library:

npm install @nozezlab/baileys

✨ Core Features

  • Native Interactive Buttons (sendButtons): Easily send interactive buttons (replies, links, copy codes).
  • Single-Select Dropdown Menus (sendList): Send structured dropdown options.
  • Message Serializer (serializeMessage): Extracted fields like m.body directly mapped (even for native button responses) and attached reply helpers like m.replyButtons and m.replyList.
  • Built-in Phone Pairing (pairWithPhoneNumber): Connect instantly by displaying the pairing code cleanly in the terminal.

🚀 Quick Start Example

Here is how easily you can initialize the socket and use the custom helpers:

const makeWASocket = require('@nozezlab/baileys').default;
const { useMultiFileAuthState } = require('@nozezlab/baileys');

async function startBot() {
    const { state, saveCreds } = await useMultiFileAuthState('./session');
    
    const sock = makeWASocket({
        auth: state,
        printQRInTerminal: false // Set to false to use Pairing Code
    });
    
    sock.ev.on('creds.update', saveCreds);

    // 1. Phone pairing setup (if not registered yet)
    if (!sock.authState.creds.registered) {
        const phoneNumber = "628xxx"; // Change to your bot's phone number
        await sock.pairWithPhoneNumber(phoneNumber);
    }

    sock.ev.on('connection.update', (update) => {
        const { connection } = update;
        if (connection === 'open') {
            console.log("✅ Bot connected successfully!");
        }
    });

    sock.ev.on('messages.upsert', async (chatUpdate) => {
        const mek = chatUpdate.messages[0];
        if (!mek.message) return;

        // Serialize message to get custom helpers & body parser
        const m = sock.serializeMessage(mek);

        // Command handler example
        if (m.body === '.menu') {
            const buttons = [
                { type: 'reply', displayText: '📁 Show All Features', id: '.allfeatures' },
                { type: 'url', displayText: '🌐 Visit Website', url: 'https://nozez.dev' },
                { type: 'copy', displayText: '🔑 Copy API Key', code: 'API_KEY_12345' }
            ];

            // Send buttons cleanly!
            await m.replyButtons(
                "🤖 NOZEZLAB SYSTEM",       // Header (Optional)
                "Welcome to KChartify Bot. Please select one option:", // Body text
                "© NozezLab Ecosystem",     // Footer (Optional)
                buttons                     // Button list
            );
        }
    });
}

startBot();

🛠️ API Reference

1. sock.sendButtons(jid, header, text, footer, buttons, quoted, mediaOptions)

  • buttons supports the following structures:
    const buttons = [
      { type: 'reply', displayText: 'Option A', id: 'opt_a' },
      { type: 'url', displayText: 'Open Website', url: 'https://example.com' },
      { type: 'copy', displayText: 'Copy Code', code: 'MY_CODE' }
    ]
  • mediaOptions supports native image headers:
    await sock.sendButtons(jid, "Header", "Text", "Footer", buttons, null, {
        image: "https://example.com/banner.png" // or local file buffer
    });

2. sock.sendList(jid, header, text, footer, buttonText, sections, quoted, mediaOptions)

  • sections structure:
    const sections = [
        {
            title: "Category 1",
            rows: [
                { title: "Option 1", description: "Select Option 1", id: ".opt1" },
                { title: "Option 2", description: "Select Option 2", id: ".opt2" }
            ]
        }
    ];
    await sock.sendList(jid, "Menu", "Select below", "Footer", "Click here", sections);

📄 License

MIT © NozezLab