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

spamwa-beta

v1.0.0

Published

A WhatsApp bot for sending messages using Baileys

Readme

SpamWA-Beta

Un bot de WhatsApp para enviar mensajes automáticamente usando Baileys.

Características

  • Fácil de usar
  • Soporte para envío de múltiples mensajes
  • Interfaz por comandos
  • Seguro y confiable
  • Fácil de integrar en tus propios proyectos

Requisitos

  • Node.js v16 o superior
  • Una cuenta de WhatsApp
  • Conexión a internet

Instalación

Como CLI (Interfaz de Línea de Comandos)

  1. Instala el paquete globalmente:
npm install -g spamwa-beta
  1. Inicia el bot:
spamwa-beta

Como módulo en tu proyecto

  1. Instala el paquete en tu proyecto:
npm install spamwa-beta
  1. Crea un archivo bot.js:
const { startBot } = require('spamwa-beta');

// Iniciar el bot
startBot();
  1. Ejecuta tu script:
node bot.js

Uso

Interfaz de Línea de Comandos

  1. Ejecuta spamwa-beta en tu terminal
  2. Escanea el código QR con tu teléfono
  3. Envía mensajes al bot siguiendo las instrucciones

API del Módulo

Puedes personalizar el comportamiento del bot:

const { startBot, setWelcomeMessage, setMaxMessages } = require('spamwa-beta');

// Personalizar mensaje de bienvenida
setWelcomeMessage('¡Hola! Soy tu bot personalizado. Usa /spamwa para empezar.');

// Cambiar el límite de mensajes (por defecto: 100)
setMaxMessages(50);

// Iniciar el bot con configuración personalizada
startBot({
    headless: true,  // Modo sin interfaz
    sessionName: 'mi-sesion',  // Nombre de la carpeta de sesión
    browserArgs: [
        '--no-sandbox',
        '--disable-setuid-sandbox'
    ]
});

Comandos disponibles

  • /start - Inicia el bot y muestra el mensaje de bienvenida
  • /spamwa - Inicia el proceso para enviar mensajes
  • /help - Muestra la ayuda
  • /status - Muestra el estado actual del bot

Ejemplo de Uso

Como Usuario Final

Usuario: /start
Bot: Hola, Soy un Sub Bot de SpamWA-Beta, escribe /spamwa para comenzar.

Usuario: /spamwa
Bot: Listo, primero dime el número telefónico de la persona existente de WhatsApp (EJ: +57 123 4567890), se acepta cualquier país.

Usuario: +1234567890
Bot: Perfecto, ahora dime el mensaje que quieres enviar

Usuario: Hola, esto es una prueba
Bot: Perfecto, ahora dime cuántas veces quieres enviar el mensaje (solo números)

Usuario: 5
Bot: Iniciando envío de 5 mensajes a +1234567890...
...
Bot: ✅ Se enviaron 5 de 5 mensajes correctamente a +1234567890

Como Desarrollador

const { startBot, onMessage, sendMessage } = require('spamwa-beta');

// Escuchar mensajes entrantes
onMessage((message, sender, reply) => {
    console.log('Mensaje recibido:', message);
    
    if (message === '/custom') {
        reply('¡Comando personalizado recibido!');
    }
});

// Enviar mensaje a un número
sendMessage('+1234567890', '¡Hola desde mi bot personalizado!');

// Iniciar el bot
startBot();

Eventos Disponibles

Puedes escuchar eventos del bot:

const { on } = require('spamwa-beta');

on('qr', (qr) => {
    console.log('Escanea este código QR:', qr);
});

on('authenticated', () => {
    console.log('¡Autenticado exitosamente!');
});

on('ready', () => {
    console.log('El bot está listo para recibir mensajes');
});

on('disconnected', (reason) => {
    console.log('Bot desconectado:', reason);
});

Seguridad

  • No almacenamos tus credenciales de WhatsApp
  • Los mensajes se envían directamente desde tu dispositivo
  • Se recomienda usar con moderación para evitar restricciones de WhatsApp
  • Usa siempre la última versión del paquete

Limitaciones

  • Máximo 100 mensajes por comando (configurable)
  • El número de teléfono debe incluir el código de país
  • El bot solo responde al primer usuario que inicia la conversación (por defecto)

Solución de problemas

Problemas Comunes

  1. El bot no responde

    • Verifica que hayas escaneado el código QR
    • Asegúrate de que el número desde el que envías mensajes sea el primero en interactuar
  2. Error de conexión

    rm -rf session

    Luego reinicia el bot.

  3. El bot se desconecta frecuentemente

    • Verifica tu conexión a internet
    • Intenta usar una red más estable

Contribución

Las contribuciones son bienvenidas. Por favor, lee nuestra guía de contribución antes de enviar un PR.

Licencia

MIT