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

hubot-discobot

v1.0.7

Published

Hubot Adapter for discord.js

Readme

hubot-discobot

A Hubot adapter for Discord, using the Discord.js API supporting the latest versions of Discord.js and Hubot. Make your own highly customizable Discord Bot.

Information

Originally based on disbot - https://github.com/atomicptr/disbot

Current Discord.js version: 13.3.1 Required Node.js version: >= 16.6.0

For an example of a working, complete implementation of Hubot and Hubot-discobot adapter, check out TremBot: https://github.com/Pwn9/TremBot

See TremBot in action on the Pwn9 Discord Channel, get your server invite at http://discord.pwn9.com

Features

  • Discord.js version ^13.3.1
  • More configurable hubot / discord bot instance (see ENV in setup below)
  • Extend more Discord features into the adapter (The entire instance of Discord.js is extended to hubot scripts via robot.client where client = discord client)
  • Must be Discord.js version 13+ due to breaking changes from Discord.js v12

Setup

First, you should have hubot installed and understand that the purpose of the adapter (like this one) is to connect a hubot to an endpoint, whether that be IRC, Slack, Campfire, or in our case: Discord! Learn more at https://hubot.github.com/docs/

After that, setup is easy, just use NPM to install this adapter from github (and eventually from NPM):

npm install hubot-discobot --save

Then run hubot with the adapter flag

./bin/hubot -a discobot

You may also use a .json file with the env object set.

"env": {
    "HUBOT_DISCORD_TOKEN": "your token here",
    "HUBOT_DISCORD_INTENTS": intents bitflag
    "HUBOT_DISCORD_PARTIALS": [partials array]         
    "HUBOT_DISCORD_ACTIVITY": "Super Bot Bash"
    "HUBOT_DISCORD_ACTIVITY_TYPE": "PLAYING"
}

IMPORTANT: you need to have an environment variable called HUBOT_DISCORD_TOKEN with your Bot token which you can get here: https://discordapp.com/developers/applications/me

Environment Variables

If environment variables are not set, they will fallback to a default, with the except of token. Without a token the bot will fail and not run.

HUBOT_DISCORD_TOKEN

IMPORTANT: you need to have an environment variable called HUBOT_DISCORD_TOKEN with your Bot token which you can get here: https://discordapp.com/developers/applications/me

HUBOT_DISCORD_INTENTS

As of Discord.js v13 Intents are required to define your bots privileges: https://discordjs.guide/popular-topics/intents.html#privileged-intents

Intents is set as a bitflag, by default hubot-discobot will fallback to full intents which is 32767 - this may be unsafe and you should define your specific intents accordingly.

HUBOT_DISCORD_PARTIALS

As of Discord.js v13 Partials are required to pull data from certain events, this comes with some benefits and drawbacks, learn more at: https://discordjs.guide/popular-topics/partials.html#partial-structures

Partials is set as an array of values, by default hubot-discobot will fallback to full partials which is ['MESSAGE', 'CHANNEL', 'REACTION', 'USER', 'GUILD_MEMBER']

HUBOT_DISCORD_ACTIVITY

Set the default activity that you want your bot to have.

HUBOT_DISCORD_ACTIVITY_TYPE

Set the default activity type.

Creating scripts for your Hubot instance, with discord adpater API

You can access the discord client via robot.client. See the discord.js docs for ways to use the discord API: https://discord.js.org

Examples

Using the environment variables for your bot, you can set a custom status. Documentation available: https://discord.js.org/#/docs/main/stable/typedef/ActivityOptions

Activity type can be one of: PLAYING, STREAMING, LISTENING, WATCHING, COMPETING

For additional scripting examples, see the examples folder for a script in javascript that can set the bots current activity.