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

discord-guardian

v1.1.1

Published

Test your Discord bot against simulated nukes and protect it with minimal setup.

Readme

discord-guardian

Simulate and protect Discord bot security with a modular plugin framework.

A modular alternative to building anti-nuke and security systems from scratch, with built-in simulation for safe testing.

Installation

npm install discord-guardian

Demo

import { createBot, antiNuke, logger } from "discord-guardian"

const app = createBot(client)

app.use(antiNuke())
app.use(logger())

app.start()

app.simulate({ type: "ban", count: 3 })

Output:

[guardian] ban threshold reached
  executor: 000000000000000000
  guild: Simulation Guild

Quick Start

Use only the plugins you need:

import { createBot } from "discord-guardian/core"
import { antiNuke } from "discord-guardian/anti-nuke"
import { logger } from "discord-guardian/logger"
import { automod } from "discord-guardian/automod"

const client = new Client({ intents: [...] })
const app = createBot(client)

app.use(antiNuke())
app.use(logger({ level: "minimal" }))
app.use(automod())

app.start()

Extension Power

Create custom plugins to extend the framework in seconds:

app.use({
  name: "alerts",
  init({ on }) {
    on("threatDetected", (data) => {
      console.log(`[ALERT] Blocked ${data.type} from ${data.executorId}`)
    })
  }
})

Framework API

Import Options

You can use subpath exports (recommended) for a cleaner architecture:

import { createBot } from "discord-guardian/core"
import { automod } from "discord-guardian/automod"

Or maintain convenience with root imports:

import { createBot, automod } from "discord-guardian"

Modules

anti-nuke

Detects and blocks mass bans, kicks, channel deletions, and bot additions. Supports full attack simulation.

logger

Tiered structured logging. Minimal mode focuses strictly on critical threshold events for clean production logs.

automod

Spam and mass-mention prevention with support for users, roles, and @everyone.

Planned plugins

  • dashboard: Real-time web-based control panel.
  • analytics: Track threat trends and bot performance.
  • advanced-automod: AI-backed spam filtering.

Permissions

  • View Audit Log
  • Ban Members
  • Kick Members
  • Manage Roles
  • Send Messages

MIT