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

@roboplay/discord

v0.2.0

Published

Elevate your Discord.js bot game to the next level

Downloads

3

Readme

Robo

Robo is a lightweight, supercharged Node.js metaframework for Discord.js, designed to make building Discord bots a breeze. It features a powerful plugin architecture and simplified interaction handling with Sage, all while allowing full access to the underlying Discord.js features.

Note: This is a pre-release and is likely to undergo breaking changes before reaching version 1.0.

Installation

npm install @roboplay/discord

Getting Started

Check out the three example projects included in the GitHub repo to help you get started:

Features

  • Easy command and event creation: Simply create .ts or .js files in the appropriate directories.
  • Sage: A built-in mechanism for simplified interaction handling.
  • Plugins: Install npm packages and configure them in your project to extend your bot's functionality.
  • CLI: Includes commands like doctor, invite, and deploy for convenient bot management and deployment.
  • RoboPlay integration: Host your Robo-powered bots on the RoboPlay service, with both free and paid tiers available.

Command Handling

Creating commands is easy with Robo's file-based structure. For example, to create a /ping command, follow this structure:

/src
  /commands
    ping.js

The ping.js file can be as simple as:

export default () => {
  return 'Pong!'
}

You can further customize the command by exporting a config object:

export const config = {
	description: 'Replies with Pong!'
}

export default () => {
  return 'Pong!'
}

Event Listening

Event listening works similarly to command handling by using a file-based structure. For example, to create a ready event listener:

/src
  /events
    ready.js

The ready.js file can be as simple as:

export default () => {
	// This event will run if the bot starts, and logs in, successfully.
}

To register multiple listeners for the same event, use directories instead of files:

/src
  /events
    /ready
      one.js
      example.js

The file names can be anything you want, but we recommend using descriptive names.

CLI

The built-in CLI features the following commands:

  • dev: Run your bot in development mode.
  • build: Build your bot for production.
  • start: Start your bot.
  • doctor: Verify that your project is set up correctly.
  • invite: Generate URLs to add your Robo to servers (in beta).
  • deploy: Host your bot on RoboPlay for free.

Configuration

Robo supports configuration through a configuration file, allowing you to enable or disable features like Sage, set up permissions and intents, and configure installed plugins.

// @ts-check

/**
 * @type {import('@roboplay/discord').Config}
 **/
export default {
	intents: ['Guilds', 'GuildMessages', 'MessageContent']
}

License

MIT License

Copyright (c) 2023 WavePlay