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

@matta-official/bot-framework

v1.0.1

Published

A simple discord bot framework for discord.js

Readme

🔩 Bot Framework

A simple Discord bot command/event framework. Supporting slash commands.

Features

  • Slash Commands
  • Utility Classes
  • Full API coverage (using discord.js)
  • Runs on Node
  • es6 syntax

Intallation

Install from npm

npm i bot-framework

Install dependencies

npm i discord.js

Create the bot

import { Bot } from 'bot-framework';

const client = new Bot({
	owner: 'YOUR_OWNER_ID',
	token: 'YOUR_BOT_TOKEN',
	command_dir: './commands',
	component_dir: './components',
	event_dir: './events',
	config: './config.yaml',
});

client.login();

Contributing

Contributions are always welcome! More info on how to contribute coming soon™.

Authors

Reference

Bot

When creating a bot, you can provide the following options:

| Option | Description | Default | Required | | --------------- | ----------------------------------------- | -------------- | -------- | | owner | The ID of the bot owner | | true | | token | The bot token | | true | | guild | The ID of the guild to deploy commands in | | false | | command_dir | The directory where commands are stored | ./commands | false | | component_dir | The directory where components are stored | ./components | false | | event_dir | The directory where events are stored | ./events | false | | config | The path to the config file | {} | false | | force | Force the bot to refresh the commands | false | false |

Commands

Create a command by doing the following:

import { Command } from 'bot-framework';

export default new Command({
	name: 'ping',
	description: 'Responds with pong!',
	// Also supports 'options', 'permissions', 'type'

	callback: (client, interaction) => {
		interaction.reply('Pong!');
	},
});

Components

Components are a framework for adding interactive elements to messages. Create a component by doing the following:

import { Component } from 'bot-framework';

export default new Component({
	id: 'press_me',
	type: 'button', // can also be select_menu

	callback: (client, interaction) => {
		interaction.reply('Pong!');
	},
});

Events

Events have a different number of arguments passed, check the discord.js documentation for information on each. Always pass the client before any additional arguments.

import { Event } from 'bot-framework';

export default new Event({
	name: 'ready',
	once: true, // omit this to listen for multiple events

	callback: (client, ...args) => {
		console.log(`Logged in as ${client.user.tag}!`);
	},
});

Datastore

Coming soon™ - Will be a simple key/value store accessible from the client object.