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

@fahriofficial/baileys-pro

v7.7.7

Published

WhatsApp API - Full Modif by Fahri - OfficiaL | No Limit, No Rules, Full Control!

Readme

🚀 Baileys WhatsApp API - By Fahri - OfficiaL

GitHub stars GitHub license Node.js Contributors

Baileys WhatsApp API adalah library berbasis Node.js untuk berkomunikasi dengan WhatsApp Web tanpa perlu WebSocket tambahan. Ini adalah hasil modifikasi dari Whiskey Baileys agar lebih stabil dan mendukung lebih banyak tipe pesan.

Dikembangkan dengan performa tinggi untuk kebutuhan bot, otomatisasi pesan, dan integrasi aplikasi WhatsApp lainnya.

📌 Tentang Proyek Ini

Repositori ini dikembangkan dan dikelola oleh Fahri - OfficiaL bersama para kontributor open-source lainnya.
Dukungan dan kontribusi dari komunitas sangat diapresiasi! 💖


✨ Fitur Utama

Autentikasi tanpa QR menggunakan session authentication
Dukungan Multi-Device (MD) terbaru dari WhatsApp
Kirim & terima pesan dalam berbagai format
Mengelola grup (buat grup, tambahkan/kick anggota, atur deskripsi, dll.)
Integrasi event seperti masuk/keluar grup, pesan diterima, pesan terbaca

📦 Instalasi

Pastikan Node.js ≥ 14.0++ sudah terpasang, Kemudian jalankan perintah berikut di terminal:

npm install @fahriofficial/baileys-pro

Atau dengan Yarn:

yarn add @fahriofficial/baileys-pro

🚀 Penggunaan Dasar pairing code

const { useMultiFileAuthState, makeWASocket } = require('@fahriofficial/baileys-pro');
const readline = require('readline');

const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
const question = (q) => new Promise(res => rl.question(q, res));

async function start() {
  const { state, saveCreds } = await useMultiFileAuthState('./session');
  const usePairingCode = true;

  const conn = makeWASocket({
    auth: state,
    printQRInTerminal: !usePairingCode,
    keepAliveIntervalMs: 50000,
  });

  conn.ev.on('creds.update', saveCreds);

  if (usePairingCode && !conn.authState.creds.registered) {
    const phone = (await question('Enter Your Number Phone:\n')).replace(/\D/g, '');
    rl.close();
    try {
      const code = await conn.requestPairingCode(phone);
      console.log('Code Whatsapp:', code.match(/.{1,4}/g).join('-'));
    } catch (e) {
      console.log('Failed to get pairing code:', e.message);
    }
  }

  conn.ev.on('connection.update', ({ connection, lastDisconnect }) => {
    if (connection === 'close') {
      const reason = lastDisconnect?.error?.output?.statusCode || 'Unknown';
      console.log('Connection closed:', reason);
      if ([401, 405].includes(reason)) {
        console.log('Logged out, delete session folder to relogin');
      } else if ([515, 428].includes(reason)) {
        console.log('Restarting...');
        start();
      }
    } else if (connection === 'open') {
      console.log('Whatsapp connected');
    }
  });

  conn.ev.on('messages.upsert', async (m) => {
    if (m.type === 'notify') {
      const msg = m.messages[0];
      if (!msg.key.fromMe && msg.message) {
        await conn.sendMessage(msg.key.remoteJid, { text: 'Hello there!' });
      }
    }
  });
}

start();

📜 Dokumentasi API

| Fitur | Deskripsi | |---------------------|----------| | sendMessage() | Mengirim pesan teks, gambar, video, dll. | | updateProfile() | Mengubah foto profil dan nama pengguna | | getChats() | Mendapatkan daftar chat pengguna | | groupParticipantsUpdate() | Menambahkan/menghapus anggota grup |

📖 Dokumentasi lengkap: Baileys API Docs


📩 Contoh Kode Tambahan

🪀 Mengirim Semua Interaktif Msg

await sock.sendMessage(m.chat, {
  text: "halo",
  title: "tes",
  footer: "© Fahri - OfficiaL - 2025",
  interactiveButtons: [{
               "name": "single_select",
               "buttonParamsJson": "{\"title\":\"title\",\"sections\":[{\".menu\":\".play dj webito\",\"highlight_label\":\"label\",\"rows\":[{\"header\":\"header\",\"title\":\"title\",\"description\":\"description\",\"id\":\"id\"},{\"header\":\"header\",\"title\":\"title\",\"description\":\"description\",\"id\":\"id\"}]}]}"
             },
             {
               "name": "cta_reply",
               "buttonParamsJson": "{\"display_text\":\"quick_reply\",\"id\":\"message\"}"
             },
               {
                "name": "cta_url",
                "buttonParamsJson": "{\"display_text\":\"url\",\"url\":\"https://www.google.com\",\"merchant_url\":\"https://www.google.com\"}"
             },
             {
                "name": "cta_call",
                "buttonParamsJson": "{\"display_text\":\"call\",\"id\":\"message\"}"
             },
             {
                "name": "cta_copy",
                "buttonParamsJson": "{\"display_text\":\"copy\",\"id\":\"123456789\",\"copy_code\":\"message\"}"
             },
             {
                "name": "cta_reminder",
                "buttonParamsJson": "{\"display_text\":\"Recordatorio\",\"id\":\"message\"}"
             },
             {
                "name": "cta_cancel_reminder",
                "buttonParamsJson": "{\"display_text\":\"cta_cancel_reminder\",\"id\":\"message\"}"
             },
             {
                "name": "address_message",
                "buttonParamsJson": "{\"display_text\":\"address_message\",\"id\":\"message\"}"
             },
             {
                "name": "send_location",
                "buttonParamsJson": ""
             }]
}, { quoted: m });

🏓 Mengirim Pesan Button

sock.sendMessage(m.chat, {
     text: "Hello World !",
     footer: "Fahri - OfficiaL",
     buttons: [ 
         { buttonId: `.play`,
          buttonText: {
              displayText: 'ini button'
          }, type: 1 }
     ],
     headerType: 1,
     viewOnce: true
 },{ quoted: null })

📢 Mengirim Pesan Toko

sock.sendMessage(msg.key.remoteJid, {
    text: "Isi Pesan",
    title: "Judul",
    subtitle: "Subjudul",
    footer: "Footer",
    viewOnce: true,
    shop: 3,
    id: "199872865193",
}, { quoted: m })

📊 Hasil Polling dari Newsletter

await sock.sendMessage(msg.key.remoteJid, {
    pollResult: {
        name: "Judul Polling",
        votes: [
            ["Opsi 1", 10], 
            ["Opsi 2", 10]
        ],
    }
}, { quoted: m })

🏷️ Mention di Status

await sock.StatusMentions({ text: "Halo!" }, [
    "[email protected]",
    "[email protected]",
])

🃏 Pesan dengan Kartu

await sock.sendMessage(msg.key.remoteJid, {
    text: "Halo!",
    footer: "Pesan Footer",
    cards: [
        {
            image: { url: 'https://example.jpg' }, 
            title: 'Judul Kartu',
            caption: 'Keterangan Kartu',
            footer: 'Footer Kartu',
            buttons: [
                { name: "quick_reply", buttonParamsJson: JSON.stringify({ display_text: "Tombol Cepat", id: "ID" }) },
                { name: "cta_url", buttonParamsJson: JSON.stringify({ display_text: "Buka Link", url: "https://www.example.com" }) }
            ]
        }
    ]
}, { quoted: m })

📷 Pesan Album

await sock.sendAlbumMessage(msg.key.remoteJid, [
    { image: { url: "https://example.jpg" }, caption: "Halo Dunia" },
    { video: { url: "https://example.mp4" }, caption: "Halo Dunia" }
], { quoted: m, delay: 2000 })

📌 Menyimpan & Menyematkan Pesan

await sock.sendMessage(msg.key.remoteJid, { keep: message.key, type: 1, time: 86400 })
await sock.sendMessage(msg.key.remoteJid, { pin: message.key, type: 1, time: 86400 })

📨 Pesan Undangan Grup

await sock.sendMessage(msg.key.remoteJid, { 
    groupInvite: { 
        subject: "Nama Grup",
        jid: "[email protected]",
        text: "Undangan Grup",
        inviteCode: "KODE",
        inviteExpiration: 86400 * 3,
    } 
}, { quoted: m })

Dan Banyak Lagi Kode Pesan Baharu⚡

🤝 Kontribusi

Kami menyambut kontribusi dari siapa saja! Jika ingin membantu:

  1. Fork repositori ini
  2. Buat branch baru
  3. Buat Pull Request (PR)

💡 Punya ide keren? Silakan buat Issue di repository ini.


📬 Kontak

📩 Email: [email protected] 🌍 Website: Baileys API


🚀 Semoga kamu suka & semangat ngoding!