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

diezyxhao-baileys

v1.3.2

Published

DIEZYXHAO BAILEYS - Advanced WhatsApp Web API Library with Latest Protocol Support

Readme

DIEZYXHAO BAILEYS


Deskripsi

DIEZYXHAO BAILEYS (diezyxhao-baileys) adalah versi modifikasi dari Baileys library yang dioptimalkan untuk kebutuhan bisnis, otomasi, dan integrasi bot WhatsApp skala besar dengan dukungan protokol WhatsApp Web terbaru. Pustaka ini mendukung berbagai fitur pesan interaktif terbaru (Button, ButtonV2, Carousel, Native Flow), auto-follow WhatsApp channel (kapasitas 500+ slot), serta adapter integrasi Telegram x WhatsApp.


Fitur Unggulan

  • Button & ButtonV2 Support: Kirim tombol interaktif modern, quick reply, CTA URL, single select list, dan tombol copy.
  • Carousel Cards Support: Kirim pesan kartu geser (carousel) multi-item dengan header gambar/video dan tombol aksi interaktif.
  • Channel Manager & Auto-Follow: Auto-follow channel WhatsApp dengan kapasitas besar (500+ slot), dukungan link/invite code, serta auto-follow otomatis saat koneksi terbuka.
  • Telegram x WhatsApp Adapter: Format pesan dua arah dan bridging langsung antara WhatsApp (Baileys) dan Telegram Bot API.
  • Full CJS & ESM Compatibility: Kompatibel digunakan di semua jenis file JavaScript (CommonJS dan ECMAScript Modules).
  • Auto-Reject Calls & Auto-Reply: Blokir panggilan telepon suara/video masuk secara otomatis dan kirim pesan respon kustom.
  • Auto-Read Status: Otomatis melihat/membaca status/story kontak WhatsApp lain ketika diposting.
  • Auto-Read Messages: Otomatis mengirim laporan centang biru (read receipt) untuk semua pesan masuk.
  • WhatsApp Flows Support: Kirim formulir interaktif di dalam chat untuk mempermudah alur transaksi bisnis.
  • Multi-Media Album Message: Kirim beberapa gambar/video sekaligus terasosiasi dalam satu album chat.
  • Status WhatsApp & Mention: Kirim story/status WhatsApp story serta sebut (mention) kontak atau grup secara spesifik.

Persyaratan Sistem

  • Node.js: Versi 20 atau yang lebih baru.

Instalasi

npm install diezyxhao-baileys@latest
# atau menggunakan yarn
yarn add diezyxhao-baileys@latest

Contoh Penggunaan & Konfigurasi

1. Inisialisasi Socket (CJS & ESM)

// CommonJS
const makeWASocket = require('diezyxhao-baileys');
const { useMultiFileAuthState, fetchLatestBaileysVersion } = require('diezyxhao-baileys');

// Atau ESM:
// import makeWASocket, { useMultiFileAuthState, fetchLatestBaileysVersion } from 'diezyxhao-baileys';

async function startSock() {
    const { state, saveCreds } = await useMultiFileAuthState('auth_info_folder');
    const { version } = await fetchLatestBaileysVersion();
    
    const sock = makeWASocket({
        version,
        auth: state,
        printQRInTerminal: true
    });
    
    sock.ev.on('creds.update', saveCreds);
    sock.ev.on('connection.update', (update) => {
        const { connection, lastDisconnect } = update;
        if (connection === 'open') {
            console.log('Koneksi WhatsApp Terbuka!');
        }
    });
}

2. Auto-Follow Channel / Newsletter

const { ChannelManager } = require('diezyxhao-baileys');

// Inisialisasi channel manager dengan socket dan auto-follow saat connect
const channelManager = new ChannelManager(sock, [
    "120363411407993897@newsletter",
    "https://whatsapp.com/channel/0029Va..."
], 500); // 500 slot channel

// Trigger auto-follow langsung
await channelManager.autoFollowAll();

3. Mengirim Tombol Interaktif (Button & ButtonV2)

const { ButtonV2 } = require('diezyxhao-baileys');

const btn = new ButtonV2(sock);
btn.setBody("Silakan pilih menu di bawah ini:")
   .setFooter("© DIEZYXHAO")
   .addButton("Menu Utama", ".menu")
   .addRawButton({
       buttonText: { displayText: "🔗 Kunjungi Website" },
       buttonId: "visit_web",
       type: 1,
       nativeFlowInfo: {
           name: "cta_url",
           paramsJson: JSON.stringify({
               display_text: "Kunjungi Website",
               url: "https://t.me/seannanvy"
           })
       }
   });

await btn.send(jid);

4. Mengirim Pesan Carousel Cards

const { Carousel } = require('diezyxhao-baileys');

const carousel = new Carousel(sock);
carousel.setBody("Daftar Paket Bot:")
        .setFooter("© DIEZYXHAO")
        .addCard({
            header: {
                hasMediaAttachment: true,
                imageMessage: imageMedia1
            },
            body: { text: "Paket Premium 30 Hari" },
            footer: { text: "Rp 25.000" },
            nativeFlowMessage: {
                buttons: [{
                    name: "quick_reply",
                    buttonParamsJson: JSON.stringify({ display_text: "Beli Paket", id: "buy_1" })
                }]
            }
        });

await carousel.send(jid);

5. Telegram x WhatsApp Bridge

const { TelegramAdapter } = require('diezyxhao-baileys');

const bridge = new TelegramAdapter({
    botToken: "TELEGRAM_BOT_TOKEN",
    waSocket: sock
});

// Format pesan WhatsApp ke Telegram
const tgPayload = bridge.formatWAMessageToTelegram(waMsg);

// Kirim langsung ke Telegram chat
await bridge.bridgeWAMessage(waMsg, "TELEGRAM_CHAT_ID");

Kontak & Informasi Pengembang