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

adb-plugin-moderation

v1.0.1

Published

Core moderation commands for Advanced Discord Bot

Readme

adb-plugin-moderation

Core moderation commands for Advanced Discord Bot.

What it does

  • Actions: ban, unban, kick, timeout, untimeout, warn
  • Records: case log, per-member warning history, moderator notes
  • Queries: case lookup, user history, modstats (monthly breakdown)
  • Utilities: purge messages, slowmode, lock/unlock channels
  • Tickets: setup category/role, open/close/add/remove users

All actions create a numbered case and optionally post an embed to a log channel. Warnings can trigger automatic escalation (timeout → kick → ban) at configurable thresholds.

Requirements

  • Node.js 18+
  • Advanced Discord Bot with plugin loader
  • MongoDB (via ADB's mongoose connection)
  • Discord bot with these permissions:
    • Ban Members
    • Kick Members
    • Moderate Members (timeout)
    • Manage Messages (warn, purge, note)
    • Manage Channels (slowmode, lock, ticket channels)
    • Manage Guild (clearwarnings, modstats, ticket setup)

Installation

Inside your bot directory:

npm install adb-plugin-moderation

Then add the plugin to your ADB config:

{
  "plugins": ["adb-plugin-moderation"]
}

Restart the bot. The plugin registers slash commands on load — deploy them to Discord:

node deploy-commands.js

Configuration

Run /ticket setup in your server to configure tickets. All other settings go in the ADB plugin config UI or directly via the database.

| Key | Default | Description | |---|---|---| | log_channel_id | null | Channel to post case embeds | | ticket_category_id | null | Category for ticket channels | | ticket_support_role_id | null | Role pinged when a ticket opens | | ticket_log_channel_id | null | Channel for ticket transcripts on close | | dm_on_action | true | DM users when actioned | | warn_thresholds | see below | Auto-escalation on warning count |

Default warn thresholds

{
  "3":  { "action": "timeout", "duration": "1h" },
  "5":  { "action": "timeout", "duration": "24h" },
  "7":  { "action": "kick" },
  "10": { "action": "ban" }
}

Commands

| Command | Permission | Description | |---|---|---| | /ban | Ban Members | Ban a user | | /unban | Ban Members | Unban by user ID | | /kick | Kick Members | Kick a member | | /timeout | Moderate Members | Timeout (1m–28d) | | /untimeout | Moderate Members | Remove timeout | | /warn | Manage Messages | Issue a warning | | /warnings | Manage Messages | View warnings for a user | | /clearwarnings | Manage Guild | Clear all warnings | | /note | Manage Messages | Add a private mod note | | /purge | Manage Messages | Bulk-delete messages | | /slowmode | Manage Channels | Set channel slowmode | | /lock | Manage Channels | Prevent @everyone from sending | | /unlock | Manage Channels | Restore @everyone send permission | | /case | Manage Messages | Look up a case by number | | /history | Manage Messages | View a user's case history | | /modstats | Manage Guild | View a moderator's monthly stats | | /ticket setup | Manage Guild | Configure the ticket system | | /ticket open | Everyone | Open a support ticket | | /ticket close | Manage Channels | Close and archive a ticket | | /ticket add | Manage Channels | Add a user to a ticket | | /ticket remove | Manage Channels | Remove a user from a ticket |

Testing

npm test

Runs the local harness — no Discord or MongoDB connection required.

License

This project is licensed under the GNU Affero General Public License v3.0. See the LICENSE file for details.

This repository follows the policies of the main ADB project.