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 🙏

© 2024 – Pkg Stats / Ryan Hefner

panda-discord

v4.5.0

Published

Command framework for building Discord bots with discord.js, allowing chat and slash commands to run through one handler.

Downloads

23

Readme

Panda

Panda is a command framework for building Discord bots on discord.js. Panda provides a strongly-typed class-based structure for writing complex commands.

Panda provides a wide set of extendible classes for bots, commands, events, and services that allow anyone to rapidly spin up a complex Discord bot with a large set of commands. The primary motivation behind this command framework is the ability to handle chat (message) and slash (interaction) commands in the exact same way. Panda commands only require a single run() method for both. Panda takes care of all argument parsing behind the scenes, making complex commands much easier to implement.

A small example bot can be found in the example folder.

Panda is also the framework that powers Spinda.

Get Started

npm install --save panda-discord

Tutorial

Coming soon!

Features

  • Bot
    • Easily-configured options.
    • Automatic slash command uploading and updating.
    • Enable and disable chat and slash commands with a single setting.
    • Consistent embed and error formatting.
    • Easily refreshable without bot restart.
    • Consistent argument parsing with grouping by quotations or code blocks.
    • Named argument parsing (such as --help and --timeout=20).
    • Utility methods for parsing mentions and fetching users, channels, and roles.
    • Guild-specific command prefixes.
    • Run command using bot mention.
  • Commands
    • Run chat and slash commands using a single run() method.
    • Easily extendable classes for defining simple commands, parameterized commands, and nested commands (command with subcommands).
    • Fields for automatically generating help pages.
    • Simple and long descriptions.
    • Argument configuration with validators and transformers.
    • Required, named, and hidden arguments.
    • Command categories.
    • Hidden command categories.
    • Command permissions based on member permissions and/or custom validation.
    • Command timeouts.
    • Command examples.
    • Command handlers receive context, including bot, command source, arguments, and guild.
    • Different command configurations for commands and subcommands.
    • Enable or disable chat and slash at the command level.
    • Default member permissions.
    • Register command only in a specific guild.
    • Allow commands to run in DMs.
    • Get help by specifying --help named argument.
    • Default eval, help, and ping commands.
  • Services
    • Help service for listing commands by category and giving command usage.
    • Extensible help service using custom help handlers.
    • Member list service for caching entire guild member lists.
    • Timeout service for automatically timing out users that violate command timeouts.
  • Events
    • Default messageCreate event for running chat commands.
    • Default interactionCreate event for running slash commands.
    • Default ready and shardResume events for setting bot presence.
  • Utility
    • Argument splitting.
    • Discord-specific parsing methods.
    • Eval contexts.
    • Named argument parsing.
    • Timed cache.