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

silentwolf

v1.0.2

Published

A powerful WhatsApp bot library built on Baileys. Fast, clean, and built for hunters.

Readme


Installation

npm install silentwolf

Quick Start

const { createBot } = require('silentwolf');

async function main() {
  const { sock, sender, router, store } = await createBot({ prefix: '!' });

  router.register('ping', { description: 'Ping the bot' }, async ({ message }) => {
    await sender.sendReply(message.key.remoteJid, '🐺 Pong!', message);
  });

  sock.ev.on('messages.upsert', ({ messages }) => {
    for (const msg of messages) {
      store.save(msg.key.remoteJid, msg);
      router.handle(sock, msg);
    }
  });
}

main();

API Reference

createBot(options)

| Option | Type | Default | Description | |--------------|---------|---------|------------------------------------| | prefix | string | "!" | Command prefix | | usePairingCode | boolean | false | Use pairing code instead of QR | | phoneNumber | string | "" | Phone number for pairing code |

Returns { sock, sender, router, store }.


MessageSender

| Method | Description | |--------|-------------| | sendText(jid, text) | Send a plain text message | | sendReply(jid, text, quotedMessage) | Reply to a specific message | | sendImage(jid, imageBuffer, caption) | Send an image with optional caption | | sendVideo(jid, videoBuffer, caption) | Send a video with optional caption | | sendDocument(jid, buffer, filename, mimetype) | Send a file/document | | sendReaction(jid, messageKey, emoji) | React to a message with an emoji |


CommandRouter

| Method | Description | |--------|-------------| | register(name, options, handler) | Register a command with optional aliases, adminOnly, groupOnly | | handle(sock, message) | Process an incoming message and route to the right command |

Handler receives: { sock, message, args, sender, isGroup, isAdmin }


MessageStore

| Method | Description | |--------|-------------| | save(jid, message) | Save a message (auto-evicts oldest after 1000) | | getById(jid, messageId) | Get a message by ID | | getHistory(jid, limit) | Get recent messages for a chat | | delete(jid, messageId) | Delete a specific message | | clear(jid) | Clear all messages for a chat | | persistToDisk(folderPath) | Save store to a JSON file | | loadFromDisk(folderPath) | Load store from a JSON file on startup |


Session Management

| Function | Description | |----------|-------------| | exportSession(authFolder) | Export credentials as a SILENTWOLF_... string | | importSession(sessionId, authFolder) | Restore credentials from a session ID string | | isSessionValid(authFolder) | Check if valid credentials exist |

Example

const { exportSession, importSession, isSessionValid } = require('silentwolf');

// Export current session
const sessionId = await exportSession('auth_info');
console.log(sessionId); // SILENTWOLF_eyJ...

// Import session on a new machine
await importSession('SILENTWOLF_eyJ...', 'auth_info');

// Check before connecting
const valid = await isSessionValid('auth_info');
if (!valid) {
  console.log('Please scan QR or provide a session ID.');
}

License

MIT