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

whatsamigos

v1.0.0

Published

WhatsApp bot framework with interactive messages, buttons, polls, and more - built on whaileys

Downloads

111

Readme

Whaily - WhatsApp Test Bot

A comprehensive WhatsApp test bot built with the whaileys library. This bot demonstrates various WhatsApp message types, interactive features, and API capabilities.

🚀 Quick Start

# Install dependencies
npm install

# Start the bot
npm start

Scan the QR code with your WhatsApp app to connect.

📋 Available Commands

Send any of these commands to test different WhatsApp features:

📌 Basic Commands

| Command | Description | |---------|-------------| | !help | Show all available commands | | !ping | Simple text message response | | !reply | Reply to your message | | !mention | Mention you in a message |

🖼️ Media Commands

| Command | Description | |---------|-------------| | !image | Send an image message | | !video | Send a video message | | !audio | Send an audio message | | !document | Send a PDF document | | !sticker | Send a sticker |

📍 Location & Contact

| Command | Description | |---------|-------------| | !location | Send a location message | | !contact | Send a contact card |

🔘 Interactive Messages

| Command | Description | |---------|-------------| | !buttons | Button message (NativeFlow) | | !list | List message with sections | | !template | Template with URL, call, copy buttons | | !poll | Create a poll |

🎯 Button Types

| Command | Description | |---------|-------------| | !urlbtn | URL button - opens a website | | !callbtn | Call button - makes a phone call | | !copybtn | Copy button - copies text to clipboard | | !replybtn | Quick reply buttons | | !selectbtn | Single select list | | !carousel | Carousel (experimental) |

📦 Advanced Features

| Command | Description | |---------|-------------| | !album | Album message (multiple images) | | !event | Event/calendar message | | !product | Product catalog showcase | | !payment | Payment request message |

⚙️ Other Features

| Command | Description | |---------|-------------| | !react | React to a message | | !presence | Show typing indicator | | !profile | Fetch profile picture | | !delete | Message deletion test | | !disappear | Disappearing message |

🧪 Test Suite

| Command | Description | |---------|-------------| | !testall | Run all 23 tests sequentially |

📂 Project Structure

whaily/
├── src/
│   ├── index.js              # Main entry point
│   ├── custom-auth-state.js  # Authentication handler
│   └── commands/
│       ├── index.js          # Command exports
│       ├── basic.js          # !ping, !reply, !mention
│       ├── media.js          # !image, !video, !audio, !document, !sticker
│       ├── location-contact.js # !location, !contact
│       ├── interactive.js    # !buttons, !list, !template, !poll
│       ├── features.js       # !react, !presence, !profile, !delete, !disappear
│       ├── help.js           # !help
│       ├── testall.js        # !testall
│       └── buttons/          # Button type commands
│           ├── index.js      # Re-exports all button modules
│           ├── url.js        # !urlbtn
│           ├── call.js       # !callbtn
│           ├── copy.js       # !copybtn
│           ├── reply.js      # !replybtn
│           ├── select.js     # !selectbtn
│           ├── carousel.js   # !carousel
│           ├── album.js      # !album
│           ├── event.js      # !event
│           ├── product.js    # !product
│           └── payment.js    # !payment
├── auth_info_whaileys/       # Session data (gitignored)
└── package.json

🔧 Configuration

The bot uses these default settings in src/index.js:

{
    printQRInTerminal: true,
    browser: ['Whaileys Fixed Bot', 'Chrome', '1.0.0'],
    syncFullHistory: false,
    markOnlineOnConnect: false,
    connectTimeoutMs: 60000,
    keepAliveIntervalMs: 10000,
    qrTimeout: 40000
}

📊 Test Results Summary

When you run !testall, you'll get a summary like:

📊 Test Results Summary

✅ Text Message
✅ Reply Message
✅ Mention Message
✅ Image Message
✅ Video Message
✅ Audio Message
✅ Document Message
✅ Sticker Message
✅ Location Message
✅ Contact Message
✅ Button Message
✅ List Message
✅ Template Buttons
✅ Poll Message
✅ Reaction
✅ Presence Update
✅ Profile Picture
✅ Message Deletion
✅ Disappearing Messages
✅ Album Message
✅ Event Message
✅ Product Message
✅ Payment Request

✅ Passed: 23
❌ Failed: 0
📝 Total: 23

⚠️ Known Limitations

Some features work differently with whaileys compared to other forks:

| Feature | Status | Notes | |---------|--------|-------| | Native Product Messages | ⚠️ | Falls back to image + buttons | | Native Payment Requests | ⚠️ | Falls back to interactive buttons | | Album Messages | ⚠️ | Falls back to individual images | | Event Messages | ⚠️ | Falls back to text format | | Carousel | ❌ | Requires WhatsApp Business API | | Fetch User Status | ❌ | API unreliable in whaileys |

🔗 Based on Whaileys

This bot uses the whaileys library - a stable fork of Baileys focused on simplicity and reliability.

Installing Whaileys

npm i whaileys

📝 Adding New Commands

  1. Create a new file in src/commands/ or src/commands/buttons/
  2. Export your function
  3. Add to the appropriate index.js
  4. Add the command route in src/index.js
  5. Update help.js with the new command

Example:

// src/commands/buttons/mybutton.js
async function testMyButton(sock, jid) {
    await sock.sendMessage(jid, {
        interactiveMessage: {
            body: { text: 'My custom button' },
            nativeFlowMessage: {
                buttons: [
                    {
                        name: 'quick_reply',
                        buttonParamsJson: JSON.stringify({
                            display_text: 'Click Me',
                            id: 'my_btn'
                        })
                    }
                ]
            }
        }
    });
}

module.exports = { testMyButton };

🐛 Troubleshooting

Connection Issues

  • Delete auth_info_whaileys/ folder and restart
  • Check internet connection
  • Ensure WhatsApp is not logged out on phone

QR Code Not Showing

  • Ensure terminal supports QR rendering
  • Check printQRInTerminal: true in config

Commands Not Working

  • Check case sensitivity (commands are case-insensitive)
  • Ensure bot connection is stable (✅ Connected to WhatsApp!)

📄 License

MIT License


Made with ❤️ using whaileys