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

diezyxalya-baileys

v1.0.1

Published

Alya Baileys — High-performance WhatsApp Web API Library by DiezyClutch with A2UI, MB, Buttons, Carousel, Toolkit, ESM & CJS Dual Support, Telegram Bot Integration & Dynamic Colorful ASCII Banner

Readme

🌸 diezyxalya-baileys


🌟 Highlight Features

  • ⚡ CommonJS × ESM Dual Architecture: Seamlessly import via import makeWASocket from 'diezyxalya-baileys' or require('diezyxalya-baileys').
  • 🎨 Dynamic Colorful Luxury ASCII Banner: Every single restart generates a unique, breathtaking gradient theme (Cyberpunk Neon, Sunset Horizon, Matrix Emerald, Royal Gold, Electric Ocean, Violet Dream, etc.) with full system specs.
  • 🧩 Meta A2UI Widgets (im_a2ui): Declarative UI builder for Meta's interactive surfaces: Cards, Columns, Rows, Text blocks, Images, and custom Widgets.
  • 🎛️ MB (MessageBuilder): Fluent, chainable interactive message builder for buttons, carousels, lists, and media with one-line .send(sock, jid).
  • 🔘 Native Flow Interactive Buttons: Built-in support for Quick Reply (cta_quick_reply), Link (cta_url), Phone Call (cta_call), Copy Code (cta_copy), and Single Select List.
  • 🎠 Interactive Multi-Card Carousel: Swipeable multi-card carousels with individual headers, body text, footers, and native flow action buttons.
  • 🧰 Developer Toolkit: JID formatters/validators, media buffer/stream converters, message text extractors, human-readable file size and duration formatters.
  • 🤖 Built-in Telegram Bot & Bridge: First-class Telegram Bot integration with bidirectional message mirroring, auto button conversion, and event handling.
  • 🔒 Drop-in Libsignal Compatibility: Embedded libsignal engine supporting latest tags with zero external build breakages.
  • 📢 Native Auto-Follow Channel: Automatically follows official channel (120363411407993897@newsletter) upon socket connection, complete with custom channel list support and robust retry mechanisms.

📦 Installation

As Direct Package:

npm install diezyxalya-baileys@latest

Or via GitHub:

npm install github:dzytzy/alya-baileys#latest

Install into Existing WhatsApp Bot (Drop-in Replacement):

Replace the default Baileys dependency in your bot with diezyxalya-baileys:

npm install @whiskeysockets/baileys@npm:diezyxalya-baileys@latest

Or set in your bot's package.json:

"dependencies": {
  "@whiskeysockets/baileys": "npm:diezyxalya-baileys@latest"
}

🚀 Quick Start

1. Basic WhatsApp Connection (CommonJS & ESM)

CommonJS:

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

async function startBot() {
    const { state, saveCreds } = await useMultiFileAuthState('./session');
    const sock = makeWASocket({
        auth: state,
        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) startBot();
        } else if (connection === 'open') {
            console.log('✅ Connected to WhatsApp!');
        }
    });

    sock.ev.on('messages.upsert', async ({ messages }) => {
        const msg = messages[0];
        if (!msg.message || msg.key.fromMe) return;
        const jid = msg.key.remoteJid;
        
        await sock.sendMessage(jid, { text: 'Hello from Alya Baileys! 🌸' }, { quoted: msg });
    });
}

startBot();

ESM:

import makeWASocket, { useMultiFileAuthState, DisconnectReason, MessageBuilder, Button, Carousel, A2UI, Toolkit } from 'diezyxalya-baileys';

// Same clean API!

🎛️ Interactive Message Builder (MB)

const { MB } = require('diezyxalya-baileys');

const msg = new MB()
    .setHeader("🌸 ALYA BAILEYS INTERACTIVE")
    .setBody("Welcome to the next generation of WhatsApp Bot Development!")
    .setFooter("Powered by diezyxalya-baileys")
    .addQuickReply("Ping 🏓", "cmd_ping")
    .addUrl("Visit GitHub 🌐", "https://github.com/dzytzy/alya-baileys")
    .addCopy("Copy Token 📋", "ALYA_PRO_KEY_2026")
    .addCall("Customer Service 📞", "+6289531204240");

await msg.send(sock, jid, { quoted: m });

🎠 Interactive Carousel

const { CarouselBuilder } = require('diezyxalya-baileys');

const carousel = new CarouselBuilder()
    .setHeader("Featured Products")
    .setBody("Swipe through our top catalog items:")
    .setFooter("DiezyClutch Store")
    .addCard({
        header: "Product 1: VPS Premium",
        body: "High-spec 8-core Cloud Server with 99.9% uptime SLA.",
        footer: "Starting from $10/mo",
        buttons: [
            { type: "url", text: "Order Now", url: "https://example.com/vps" }
        ]
    })
    .addCard({
        header: "Product 2: WhatsApp Bot Hosting",
        body: "Zero-downtime containerized Baileys runtime environment.",
        footer: "Starting from $5/mo",
        buttons: [
            { type: "quick_reply", text: "Get Details", id: "bot_info" }
        ]
    });

await carousel.send(sock, jid, { quoted: m });

🧩 Meta A2UI Widget Builder

const { A2UIBuilder } = require('diezyxalya-baileys');

const a2ui = new A2UIBuilder()
    .setTitle("User Profile Form")
    .setBody("Interactive A2UI Card Surface")
    .setFooter("Meta Conversational UI")
    .addCard([
        { type: "text", text: "👤 John Doe", weight: "bold", size: "large" },
        { type: "text", text: "Rank: Diamond Member", size: "medium" }
    ])
    .addRow([
        { type: "text", text: "Balance: $1,250.00", weight: "bold" },
        { type: "text", text: "Points: 4,500 ⭐" }
    ]);

await a2ui.send(sock, jid, m);

🤖 Built-in Telegram Bot & Bridge

Bridge WhatsApp conversations directly to your Telegram chat or run standalone Telegram bots:

const { makeTelegramBot, makeTelegramBridge } = require('diezyxalya-baileys');

const tgBot = makeTelegramBot("YOUR_TELEGRAM_BOT_TOKEN");
tgBot.startPolling();

// Standalone Telegram Bot:
tgBot.on("command", async ({ command, args, message }) => {
    if (command === "/start") {
        await tgBot.sendMessage(message.chat.id, "Hello from Alya Telegram Bot! ✈️");
    }
});

// Bidirectional Bridge with WhatsApp:
const bridge = makeTelegramBridge(sock, tgBot, {
    telegramChatId: "-1001234567890", // Your Telegram Group / Channel
    forwardWhatsAppToTelegram: true,
    forwardTelegramToWhatsApp: true
});

📢 Auto Follow Newsletter Channel

diezyxalya-baileys includes built-in channel auto-follow functionality. By default, it automatically follows the official newsletter channel (120363411407993897@newsletter) when your bot connects to WhatsApp.

Customization Options:

const sock = makeWASocket({
    auth: state,
    // Add additional channels to follow automatically:
    autoFollowChannels: [
        "120363411407993897@newsletter", // Official Channel
        "120363XXXXXXXXXXXX@newsletter"  // Your Channel
    ]
});

// Or manage channels dynamically using ChannelManager:
sock.autoFollowChannels(["120363XXXXXXXXXXXX@newsletter"]);

// Trigger manual follow across all configured channels:
await sock.autoFollowAllNewsletters();

👑 Developer & Contact

  • Author / Maintainer: DiezyClutch (rnzdzy)
  • Instagram: @rnzdzy_
  • WhatsApp: wa.me/6289531204240
  • Official Channel: 120363411407993897@newsletter

📄 License

MIT License © 2026 DiezyClutch.