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

@devs-des1re/djs-kit

v1.2.1

Published

Scaffold production-ready discord.js v14 bot projects

Readme


djs-kit is a powerful CLI scaffolding tool and framework for discord.js v14. It removes all the boilerplate of building a Discord bot from scratch, providing you with a production-ready setup in seconds.

Features

  • Instant Scaffolding: Create a fully-functioning bot with interactive prompts.
  • Type-Safe Builders: Chainable, deeply typed builder APIs for commands and components.
  • Smart State Serialization: Pass variables between commands and button clicks natively without a database via .addParam().
  • Components v2 Modals: Build modal text inputs, dropdowns, radio groups, checkboxes, and file/image uploads.
  • Organized Architecture: A clean, modular folder structure that scales seamlessly.
  • TypeScript & JavaScript Support: Choose between strict TS or flexible JS output.
  • Hot Reloading: Pre-configured with nodemon and tsx for instant live-reloading during development.
  • Auto Sharding: Generated bots include dev:shards and start:shards powered by Discord.js ShardingManager.
  • Startup Log Files: Every bot run writes a fresh file under logs/ for easier debugging.

Quick Start

Generate a new project using npx directly from your terminal:

npx @devs-des1re/djs-kit create my-discord-bot

The CLI will launch an interactive flow to configure your bot (Output Language, Token Validation, Guild IDs, etc). Once finished, cd into your new folder and start coding!

cd my-discord-bot
npm run dev

For auto-sharded development or production starts:

npm run dev:shards
npm run start:shards

Database Presets

Choose a storage/database preset at scaffold time:

npx @devs-des1re/djs-kit create my-bot --lang ts --guild-id 123456789012345678 --db postgres

Supported presets are none, file, sqlite, postgres, mysql, mongo, and redis. SQLite, Postgres, and MySQL generate Drizzle schema/config files plus db:generate, db:migrate, and db:studio scripts.

Starter Presets

Choose a project preset at scaffold time:

npx @devs-des1re/djs-kit create my-bot --lang ts --guild-id 123456789012345678 --preset tickets

Supported presets are:

  • bare: empty command/component/event folders
  • utility: the standard general-purpose starter
  • moderation: moderation commands and audit-log examples
  • tickets: ticket command, buttons, and modal examples
  • community: server info and member join/leave examples

CLI Tools

Once your project is scaffolded, djs-kit comes with powerful generators to create new features instantly. Run these from anywhere inside your project directory!

Add Commands

Generates a new Slash or Prefix command boilerplate.

npx @devs-des1re/djs-kit add command <name> [--type slash|prefix]

(Tip: You can use paths like admin/ban to auto-organize into folders!)

Generated projects can run slash-only, prefix-only, or both from src/config.ts. Slash commands can be registered to one guild, multiple guilds, or globally.

Add Components

Generates interactive components with built-in State Serialization handling.

npx @devs-des1re/djs-kit add button <name>
npx @devs-des1re/djs-kit add modal <name>
npx @devs-des1re/djs-kit add select <name>

Add Events

Generates a Discord event listener boilerplate.

npx @devs-des1re/djs-kit add event ready
npx @devs-des1re/djs-kit add event guildMemberAdd

Add Advanced Interactions

Generates autocomplete handlers and context menu commands.

npx @devs-des1re/djs-kit add autocomplete ping style
npx @devs-des1re/djs-kit add context inspectUser --type user
npx @devs-des1re/djs-kit add context quoteMessage --type message

Project Tools

Run these inside a generated djs-kit project:

npx @devs-des1re/djs-kit doctor
npx @devs-des1re/djs-kit validate
npx @devs-des1re/djs-kit env
npx @devs-des1re/djs-kit sync-commands
npx @devs-des1re/djs-kit upgrade

Signed Component State

Managing component state in discord.js usually requires caching IDs to a database. djs-kit solves this with signed compact custom IDs and the .addParam() API:

// Define what data the button expects
export default createButton('confirm_ban')
  .addParam('targetId')
  .setExecute(async (interaction, args) => {
    // `args.targetId` is extracted automatically!
    await interaction.reply({ content: `Banned <@${args.targetId}>` });
  });

When building the button, pass state and optional expiry/scope:

buildCustomId('confirm_ban', { targetId }, {
  expiresIn: 300,
  userId: interaction.user.id,
  guildId: interaction.guildId ?? undefined,
});

The handler verifies the signature and rejects expired or wrongly scoped component interactions automatically.

Utility Helpers

Generated projects include reusable helpers in src/lib for common bot work:

  • Safe interaction responses: safeReply, safeEdit, safeDefer, safeEphemeral
  • Embed presets: infoEmbed, successEmbed, warningEmbed, errorEmbed
  • Button pagination: paginate
  • Confirmation prompts: askForConfirmation
  • Guards: guildOnly, ownerOnly, requireUserPermissions, requireBotPermissions
  • Logging/audit helpers: sendLog, sendModerationAudit
  • Per-start log files in logs/

Documentation

The documentation site contains focused guides for the full generated stack:

  • CLI usage, project tools, and generators
  • Slash, prefix, autocomplete, and context menu commands
  • Event loading and runtime safety
  • Buttons, modals, select menus, signed custom IDs, and expirations
  • Database presets, including SQLite/Postgres/MySQL with Drizzle
  • Deployment, permissions, project presets, examples, and migration notes

Start with docs/content/docs/index.mdx if you are editing the docs locally.