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 🙏

© 2025 – Pkg Stats / Ryan Hefner

dixt

v5.0.7

Published

Discord bot framework

Readme

dixt

🔌 Plugin. Command. Done.

A modern Discord bot framework built with Discord.js, featuring a powerful plugin-based architecture and automatic slash command registration.

npm version License: MIT

Features

  • 🔌 Plugin System - Modular architecture with automatic plugin discovery
  • Slash Commands - Built-in slash command system with auto-registration
  • 🎯 Type-Safe - Full TypeScript support with comprehensive types
  • 🗄️ Database Ready - Optional MongoDB integration via Mongoose
  • 🔄 Auto-Discovery - Automatically discovers and loads plugins from dependencies
  • 📦 Monorepo - Managed with pnpm workspaces and Turbo for optimal DX

Quick Start

Create a new bot with CLI (Recommended)

The fastest way to get started:

npx create-dixt-bot@latest my-bot
# or
pnpm create dixt-bot@latest my-bot
# or
yarn create dixt-bot@latest my-bot

The CLI will guide you through:

  • ✅ TypeScript setup
  • ✅ Plugin selection
  • ✅ Example plugin creation
  • ✅ Package manager choice
  • ✅ Auto-install dependencies

Manual Installation

npm install dixt@latest discord.js
# or
pnpm add dixt@latest discord.js
# or
yarn add dixt@latest discord.js

Basic Usage

import dixt from "dixt";

const bot = new dixt({
  application: {
    id: "YOUR_APPLICATION_ID",
    name: "My Bot",
    bot: {
      token: "YOUR_BOT_TOKEN",
    },
  },
});

await bot.start();

Environment Variables

Create a .env file:

DIXT_APPLICATION_ID=your_application_id
DIXT_APPLICATION_NAME=My Bot
DIXT_BOT_TOKEN=your_bot_token
DIXT_DATABASE_URI=mongodb://localhost:27017/mybot  # Optional

CLI Commands

Dixt includes a built-in CLI for managing your bot development workflow:

Development

dixt dev
  • Auto-detects TypeScript or JavaScript projects
  • Watches for file changes and auto-restarts
  • Uses tsx for TypeScript execution (no build needed)

Build

dixt build
  • Compiles TypeScript to JavaScript (skips for JS projects)
  • Uses your project's tsconfig.json

Production

dixt start
  • Runs the compiled production build
  • For TypeScript: runs dist/index.js
  • For JavaScript: runs src/index.js

These commands are automatically added to your package.json when using create-dixt-bot.

Plugin System

Using Plugins

Install plugins as dependencies:

pnpm add dixt-plugin-logs dixt-plugin-roles

Plugins are automatically discovered from your package.json dependencies matching the dixt-plugin-* pattern.

Creating a Plugin

Create a local plugin in your project:

// plugins/my-plugin.ts
import { Events } from "discord.js";
import { DixtPlugin } from "dixt";

const myPlugin: DixtPlugin = (instance, options) => {
  instance.client.on(Events.ClientReady, () => {
    console.log("My plugin loaded!");
  });

  return {
    name: "my-plugin",
  };
};

export default myPlugin;

Then register it manually:

import dixt from "dixt";
import myPlugin from "./plugins/my-plugin";

const bot = new dixt({
  plugins: [myPlugin],
  autoDiscoverPlugins: true, // Still loads dixt-plugin-* from npm
});

Publishing to npm: Name your package dixt-plugin-* and it will be automatically discovered from dependencies!

Plugin with Options

Create an options file in options/my-plugin.ts:

export default {
  channel: "123456789",
  enabled: true,
};

Slash Commands

Adding Commands to Plugins

Plugins can return slash commands that are automatically registered:

import { SlashCommandBuilder } from "discord.js";
import { DixtPlugin, DixtSlashCommandBuilder } from "dixt";

const myPlugin: DixtPlugin = (instance) => {
  const pingCommand: DixtSlashCommandBuilder = {
    data: new SlashCommandBuilder()
      .setName("ping")
      .setDescription("Replies with Pong!"),
    execute: async (interaction) => {
      await interaction.reply("Pong!");
    },
  };

  return {
    name: "my-plugin",
    commands: [pingCommand],
  };
};

Built-in Commands

  • /help - List all available commands or get info about a specific command

Command with Autocomplete

const exampleCommand: DixtSlashCommandBuilder = {
  data: new SlashCommandBuilder()
    .setName("example")
    .setDescription("Example command")
    .addStringOption(option =>
      option
        .setName("choice")
        .setDescription("Pick an option")
        .setRequired(true)
        .setAutocomplete(true)
    ),
  execute: async (interaction) => {
    const choice = interaction.options.getString("choice");
    await interaction.reply(`You chose: ${choice}`);
  },
  autocomplete: async (interaction) => {
    const focusedValue = interaction.options.getFocused();
    const choices = ["option1", "option2", "option3"];
    const filtered = choices.filter(choice =>
      choice.startsWith(focusedValue)
    );
    await interaction.respond(
      filtered.map(choice => ({ name: choice, value: choice }))
    );
  },
};

Available Plugins

Official plugins maintained by the dixt team:

  • dixt-plugin-affix - Add prefix/suffix to member nicknames based on roles
  • dixt-plugin-join - Welcome messages for new members
  • dixt-plugin-logs - Comprehensive server logging
  • dixt-plugin-presence - Custom bot presence/status
  • dixt-plugin-react - Auto-react to messages in specific channels
  • dixt-plugin-reports - User reporting system
  • dixt-plugin-roles - Self-assignable roles with reaction buttons
  • dixt-plugin-twitch - Twitch stream notifications
  • dixt-plugin-worktime - Track voice channel work time

Development

Project Structure

dixt/
├── packages/
│   ├── dixt/                    # Core framework
│   ├── dixt-plugin-*/          # Official plugins
│   └── dixt-plugin-template/   # Plugin template
├── workshop/                    # Development workspace
└── docs/                        # Documentation site

Commands

# Install dependencies
pnpm install

# Build all packages
pnpm build

# Build core only
pnpm build:core

# Build all plugins
pnpm build:plugins

# Development mode
pnpm dev

# Lint & fix
pnpm lint:fix

# Testing workspace
cd workshop && pnpm dev

Contributing

Contributions are welcome! Please read our contributing guidelines first.

Release Process

This project uses Changesets. When contributing, create a changeset to describe your changes:

pnpm changeset

Versioning and publishing are handled automatically via CI.

License

MIT © Antoine Kingue

Links


Built with ❤️ using Discord.js