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

@modly_public/sdk

v0.1.0

Published

TypeScript client for the Modly Discord bot REST API.

Readme

@modly_public/sdk

Modly is the all-in-one Discord moderation bot — this is the official TypeScript SDK for its REST API. Use it from Node 20+, edge runtimes, or any other JS host to programmatically drive automod rules, embeds, webhooks, custom commands, moderation cases, forms, and the rest of the public guild surface.

Install

npm install @modly_public/sdk

Run without npm registry

The npm package isn't published yet — install straight from GitHub instead:

npm install github:modly-public/modly-sdk

…or clone the repo and import locally:

git clone https://github.com/modly-public/modly-sdk.git
cd modly-sdk && npm install && npm run build

The prepare script auto-runs npm run build on git-URL installs, so dist/ is populated even though it's gitignored.

Quickstart

import { ModlyClient } from "@modly_public/sdk";

const modly = new ModlyClient({
  guildId: "1234567890",
  apiKey: process.env.MODLY_API_KEY!, // modly_pat_...
});

// 1. List moderation cases
const cases = await modly.moderation.listCases({ limit: 25 });

// 2. Save and broadcast an embed
await modly.embeds.save("weekly-update", {
  content: "📰 Weekly digest",
  embeds: [{ title: "What shipped", color: 0x7c3aed }],
});

const targets = await modly.webhooks.listTargets();
await modly.webhooks.sendNow({
  targetIds: [targets[0]!.id],
  embedTemplateName: "weekly-update",
});

// 3. Create a custom command
await modly.customCommands.save({
  name: "rules",
  triggerMode: "slash",
  responseMode: "embed",
  body: { embeds: [{ title: "Rules", description: "Be kind." }] },
});

Three end-to-end walkthroughs live in docs/quickstart.md.

Authentication

Generate a personal access token in the dashboard at Account Settings → API tokens. Tokens look like modly_pat_... and are sent on every request as Authorization: Bearer <token>. Each token is bound to your dashboard session's permissions; the guildId you pass on the client decides which guild every call targets.

If you self-host Modly on a different origin, pass baseUrl:

new ModlyClient({ guildId, apiKey, baseUrl: "https://modly.example.com" });

Directory map

modly-sdk/
├── src/
│   ├── client.ts           # ModlyClient — transport + hand-rolled namespaces
│   ├── index.ts            # public entry point (re-exports)
│   ├── errors.ts           # ApiError shape
│   ├── types.ts            # shared response/request types
│   └── generated/          # 70+ auto-generated route namespaces
├── dist/                   # compiled output (published to npm)
├── docs/
│   └── quickstart.md       # three end-to-end examples
├── package.json
├── tsconfig.json
├── LICENSE
└── README.md               # you are here

| Top-level path | What's in it | |---|---| | src/ | Client source. Hand-curated transport + ~70 generated namespace attachers. | | src/generated/ | Auto-generated namespace files — one per bot route file. See the namespace index. | | docs/ | Hand-written walkthroughs and recipes. | | dist/ | TypeScript build output. Don't edit. |

Coverage

The 70+ generated namespaces cover every public bot route. Seven namespaces (modules, webhooks, embeds, moderation, safety, customCommands, personas) ship richer hand-typed responses on top of the generated layer for ergonomics. See src/generated/README.md for the full namespace list with descriptions.

Compatibility

  • Node 20+ (uses global fetch)
  • Edge runtimes: Vercel, Cloudflare Workers, Deno — pass a custom fetch if needed
  • ESM-only

Contributing

Pull requests welcome. See CONTRIBUTING.md for the auto-generation workflow and conventions. Open an issue for missing endpoints, type bugs, or DX requests.

License

MIT — see LICENSE.


Built with ❤ for Modly.

Last updated: 2026-04-30