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

wabot-button

v1.0.6

Published

Stable button & list builder for Baileys WhatsApp bot

Readme

Wabot Button

Stable button & list builder untuk Baileys WhatsApp bot.
Mendukung Template Buttons, List Messages, dan CTA Buttons.
Dibuat untuk CommonJS (CJS), siap pakai di bot WhatsApp berbasis Baileys.


📦 Install

npm install wabot-button


---

🧩 Fitur

Button Builder → Quick Reply, URL, Call

List Message Builder → Sectioned list messages

Template Builder → Semua jenis template buttons resmi

Send Adapter → Kirim ke Baileys langsung

CJS Compatible → import dengan require



---

🔹 Import Module (CJS)

const { Button, List, Template, send } = require('wabot-button')


---

1️⃣ Button Builder

Buat button interaktif:

const buttonMessage = new Button("Halo, pilih opsi:")
  .reply("menu", "Menu")
  .url("Website", "https://example.com")
  .call("Call", "628123456789")
  .build()

await send(sock, jid, buttonMessage)

.reply(id, text) → Quick reply button

.url(text, url) → Button buka website

.call(text, number) → Button call phone



---

2️⃣ List Message Builder

const listMessage = new List("Pilih menu utama", "Footer optional")
  .section("Main Menu", [
    { title: "Menu 1", rowId: "menu1" },
    { title: "Menu 2", rowId: "menu2" }
  ])
  .section("Lainnya", [
    { title: "Info", rowId: "info" }
  ])
  .build("Pilih")

await send(sock, jid, listMessage)

.section(title, rows) → tambah section

.build(buttonText) → finalize list message

Max 5 sections, max 10 rows per section



---

3️⃣ Template Builder (Official Buttons)

const templateMessage = new Template("Halo, pilih:")
  .quickReply("Menu", "menu")
  .url("Website", "https://example.com")
  .call("Call", "628123456789")
  .build()

await send(sock, jid, templateMessage)

.quickReply(text, id) → Quick reply button

.url(text, url) → URL button resmi

.call(text, number) → Call button resmi



---

4️⃣ Send Adapter

await send(sock, jid, message, { quoted: m })

sock → instance Baileys

jid → nomor / chat id

message → hasil .build()

options → optional { quoted: msg }



---

🔹 Contoh Lengkap

const { Button, List, Template, send } = require('wabot-button')

// Quick reply button
const buttons = new Button("Hai, pilih:")
  .reply("menu", "Menu")
  .url("Website", "https://example.com")
  .call("Call", "628123456789")
  .build()

// List message
const listMsg = new List("Main Menu", "Footer")
  .section("Menu Utama", [
    { title: "Profile", rowId: "profile" },
    { title: "Settings", rowId: "settings" }
  ])
  .build("Pilih")

// Template official
const templateMsg = new Template("Pilih opsi:")
  .quickReply("Menu", "menu")
  .url("Website", "https://example.com")
  .call("Call", "628123456789")
  .build()

await send(sock, jid, buttons)
await send(sock, jid, listMsg)
await send(sock, jid, templateMsg)


---

📌 Tips & Limit

Button JSON → semi-official, bisa break kalau WA update

Template Buttons → official, aman untuk bot publik

List Messages → max 5 sections, max 10 rows per section

Gunakan send(sock, jid, message) untuk semua jenis pesan



---

📚 Keywords

WhatsApp Bot

Baileys

Buttons

List Messages

Template Messages

CJS



---

⚡ License

MIT License