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

popkidmd-baileys

v1.4.2

Published

Powerful WhatsApp Web API library by Popkid

Readme

popkidmd-baileys

A powerful, modern WhatsApp Web API library built on top of Baileys. Full support for interactive buttons, lists, polls, groups, reactions, media, presence, edit/delete and the latest WhatsApp updates.

npm license


✨ Features

  • 🔘 Interactive buttons (quick-reply, URL, call) — works on the latest WhatsApp clients
  • 📋 List messages with sections & rows
  • 📊 Polls (single & multi-choice)
  • 👥 Full group management — create, add, remove, promote, demote, settings, invite links
  • 🖼️ Media: image, video, audio (PTT), document, sticker
  • 📍 Location, 📇 contacts, 😀 reactions, ✏️ edit, 🗑️ delete, ↩️ forward
  • 📱 QR or 8-digit pairing code login
  • 🔁 Auto-reconnect, presence, multi-file auth state
  • ⚡ Built-in command system with prefix
  • 🧠 TypeScript first, full type definitions

📦 Install

npm install popkidmd-baileys

🚀 Quick start

import { PopkidMD } from "popkidmd-baileys";

const bot = new PopkidMD({ sessionPath: "./session", autoReconnect: true });

bot.command("ping", async (m, ctx) => {
  await bot.sendText(ctx.from, "🏓 Pong!", m);
});

bot.command("menu", async (m, ctx) => {
  await bot.sendButtons(ctx.from, "Pick one:", [
    { id: "a", title: "Option A" },
    { id: "b", title: "Option B" },
  ], { footer: "popkidmd-baileys" });
});

await bot.start();

Scan the QR shown in the terminal with WhatsApp → Linked Devices.

Pairing code (no QR)

const bot = new PopkidMD({ pairingNumber: "254712345678" });
await bot.start(); // prints an 8-digit code to enter on your phone

🔘 Buttons & Lists

// Quick-reply buttons
await bot.sendButtons(jid, "Choose:", [
  { id: "yes", title: "✅ Yes" },
  { id: "no",  title: "❌ No"  },
]);

// URL buttons
await bot.sendUrlButtons(jid, "Links:", [{ title: "GitHub", url: "https://github.com" }]);

// Call buttons
await bot.sendCallButtons(jid, "Call us:", [{ title: "Support", phone: "+254712345678" }]);

// List
await bot.sendList(jid, "Pick:", "Open", [
  { title: "Tools", rows: [{ rowId: "t1", title: "Sticker", description: "Make sticker" }] },
]);

👥 Groups

await bot.groups.create("My Group", ["254712345678", "254799999999"]);
await bot.groups.add(groupJid, ["254700000000"]);
await bot.groups.promote(groupJid, ["254700000000"]);
await bot.groups.setMessaging(groupJid, "announcement"); // only admins can chat
const link = await bot.groups.invite(groupJid);
console.log("Invite:", `https://chat.whatsapp.com/${link}`);

🖼️ Media

await bot.sendMedia(jid, "image",    "https://picsum.photos/600", { caption: "Hi" });
await bot.sendMedia(jid, "video",    Buffer.from(...), { caption: "GIF", gifPlayback: true });
await bot.sendMedia(jid, "audio",    "./voice.ogg", { ptt: true });
await bot.sendMedia(jid, "document", "./report.pdf", { fileName: "report.pdf", mimetype: "application/pdf" });

📊 Polls, ✏️ Edit, 🗑️ Delete, 😀 React

await bot.sendPoll(jid, { name: "Pizza?", values: ["Yes", "No"], selectableCount: 1 });
await bot.react(jid, m.key, "🔥");
await bot.edit(jid, sentMsg.key, "edited!");
await bot.deleteMessage(jid, sentMsg.key);

🛠️ Run the example

git clone https://github.com/popkid/popkidmd-baileys.git
cd popkidmd-baileys
npm install
npm run dev          # starts examples/bot.ts and prints QR

🌍 Deploy 24/7

| Host | How | |---|---| | Railway | Push to GitHub → New Project → Deploy from repo → start command npm start | | Render | New Background Worker → start command npm start | | VPS / Heroku | npm install && npm run build && pm2 start dist/examples/bot.js |

⚠️ Always persist the session/ folder (volume mount on Railway/Render) so you don't have to re-scan QR.

📤 Publish your own fork to npm

npm login
npm version patch
npm publish --access public

📜 License

MIT © Popkid