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 🙏

© 2025 – Pkg Stats / Ryan Hefner

gouge

v0.0.3

Published

Ergonomic library for building bots that use Discord Slash Commands.

Downloads

7

Readme

Super-ergonomic discord bot framework, using the new Slash Commands API.

  • 100% Webhook-driven
  • Entirely type-safe handler functions
import { GougeClient, command } from 'gouge'

const client = new GougeClient({
  id: process.env.CLIENT_ID,
  key: process.env.PUBLIC_KEY,
  secret: process.env.CLIENT_SECRET,
  token: process.env.BOT_TOKEN,
})

client.with(
  command('bagel', 'Order a number of bagels')
    .string('kind', 'The kind of bagel to order', true, [
      'Plain',
      'Blueberry',
      'Poppy',
      'Cinnamon',
    ])
    .integer('amount', 'The amount of bagels to order', true)
    .handler(async (client, respond, [kind, amount]) => {
      await respond('You ordered ' + amount + ' ' + kind + ' bagels.')
    })
)

Scope

The scope of this library is:

  • A slim, ergonomic developer-facing API
  • Handling the registration, updating, and deletion of global and guild slash commands automatically, keeping them in line with the bot's code. The developer should never have to worry about 'registering' and 'deleting' global commands beyond adding and removing them from the server.
  • A high-quality documentation that is easily learned from.
  • Simple, relevant example code.

This library isn't intended to be a replacement for comprehensive, listener-based libraries (yet?!). It's essentially a slim express webserver that responds to Discord's outgoing webhooks. If you want to write a bot that listens for events of any sort besides slash commands, opt for Discord.js instead.

(Perhaps one day it will be fully featured, but that is unlikely. There are already a number of powerful libraries for making fully-fledged discord bots that will always be a better option)

Todo

There's still a lot to be done before this framework is 'production ready.' For now, it can respond to inputs.

  • [ ] Finish documenting all systems
  • [ ] Write comprehensive unit tests
  • [x] Automatic pruning of global commands that aren't handled any more.
  • [ ] Some strategy for managing guild commands between bot reboots.