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

@mostfeatured/dbi

v0.2.31

Published

The most advanced, modern, and developer-friendly Discord.js v14 bot infrastructure with slash commands, components, localization, sharding, and Svelte UI support.

Readme

🤖 DBI - Discord Bot Infrastructure

npm version npm downloads License

The most advanced, modern, and developer-friendly Discord.js v14 bot infrastructure.

Getting StartedFeaturesDocumentationExamples


✨ Features

| Feature | Description | |---------|-------------| | 🎯 Slash Commands | Full support with 14 option types, autocomplete, and subcommands | | 🔘 Components | Buttons, Select Menus (5 types), and Modals with built-in state management | | 🌍 Localization | Multi-language support for both content and command translations | | 📨 Events | Discord events, custom events, and internal DBI events | | 💬 Message Commands | Automatic slash command emulation from prefix commands | | 🔗 Reference System | Pass complex data through component interactions | | 🚀 Multi-Client | Run multiple bots with namespace isolation | | ⚡ Hybrid Sharding | Scale to millions of servers with discord-hybrid-sharding | | 🎨 Svelte Components | Build reactive Discord UIs with Svelte 5 (HTMLComponentsV2) | | 🔄 Hot Reloading | Update features without restarting your bot | | 🛡️ Rate Limiting | Built-in rate limit management per user/channel/guild | | 📝 TypeScript | Full type safety with intelligent autocomplete |


📦 Installation

npm install @mostfeatured/dbi discord.js

🚀 Quick Start

1. Create DBI Instance

// dbi.js
const { createDBI } = require("@mostfeatured/dbi");

const dbi = createDBI("my-bot", {
  strict: true,
  discord: {
    token: process.env.DISCORD_TOKEN,
    options: { intents: ["Guilds"] }
  },
  defaults: {
    locale: { name: "en" },
    directMessages: false
  }
});

module.exports = dbi;

2. Define Features

// src/commands/ping.js
const dbi = require("../dbi");

dbi.register(({ ChatInput }) => {
  ChatInput({
    name: "ping",
    description: "Check bot latency",
    onExecute({ interaction, dbi }) {
      interaction.reply(`🏓 Pong! ${dbi.client().client.ws.ping}ms`);
    }
  });
});

3. Start Bot

// index.js
const { Utils } = require("@mostfeatured/dbi");
const dbi = require("./dbi");

(async () => {
  await Utils.recursiveImport("./src");
  await dbi.load();
  await dbi.login();
  console.log(`✅ Logged in as ${dbi.client().client.user.tag}`);
})();

4. Publish Commands

// publish.js
const { Utils } = require("@mostfeatured/dbi");
const dbi = require("./dbi");

(async () => {
  await Utils.recursiveImport("./src");
  await dbi.load();
  await dbi.publish("Global"); // or dbi.publish("Guild", "GUILD_ID")
  await dbi.unload();
  console.log("✅ Commands published!");
})();

💡 Examples

Slash Command with Options

dbi.register(({ ChatInput, ChatInputOptions }) => {
  ChatInput({
    name: "greet",
    description: "Greet a user",
    options: [
      ChatInputOptions.user({
        name: "target",
        description: "User to greet",
        required: true
      }),
      ChatInputOptions.string({
        name: "message",
        description: "Custom message"
      })
    ],
    onExecute({ interaction }) {
      const user = interaction.options.getUser("target");
      const message = interaction.options.getString("message") || "Hello!";
      interaction.reply(`${message}, ${user}!`);
    }
  });
});

Button with Reference Data

const Discord = require("discord.js");

dbi.register(({ ChatInput, Button }) => {
  ChatInput({
    name: "shop",
    description: "View the shop",
    onExecute({ interaction, dbi }) {
      interaction.reply({
        content: "🛒 Welcome to the shop!",
        components: [{
          type: Discord.ComponentType.ActionRow,
          components: [
            dbi.interaction("buy-item").toJSON({
              overrides: { label: "Buy Sword - 100g" },
              reference: { data: ["sword", 100] }
            })
          ]
        }]
      });
    }
  });

  Button({
    name: "buy-item",
    options: { style: Discord.ButtonStyle.Primary },
    onExecute({ interaction, data }) {
      const [item, price] = data;
      interaction.reply(`✅ You bought **${item}** for **${price}g**!`);
    }
  });
});

Multi-Language Support

dbi.register(({ Locale, ChatInput }) => {
  Locale({
    name: "en",
    data: {
      greeting: "Hello, {0}!",
      farewell: "Goodbye!"
    }
  });

  Locale({
    name: "tr",
    data: {
      greeting: "Merhaba, {0}!",
      farewell: "Hoşça kal!"
    }
  });

  ChatInput({
    name: "hello",
    description: "Say hello",
    onExecute({ interaction, locale }) {
      const greeting = locale.user.data.greeting(interaction.user.username);
      interaction.reply(greeting);
    }
  });
});

📚 Documentation

Comprehensive documentation is available in the docs folder:

| Document | Description | |----------|-------------| | Getting Started | Installation, setup, and project structure | | Chat Input | Slash commands, options, and autocomplete | | Components | Buttons, select menus, and modals | | Events | Discord events, custom events, DBI events | | Localization | Multi-language support | | Advanced Features | Message commands, sharding, multi-client | | Svelte Components | HTMLComponentsV2 with Svelte 5 | | API Reference | Complete API documentation |


🏗️ Project Structure

my-bot/
├── dbi.js           # DBI configuration
├── index.js         # Bot entry point
├── publish.js       # Command publisher
└── src/
    ├── commands/    # Slash commands
    ├── components/  # Buttons, modals, menus
    ├── events/      # Event handlers
    └── locales/     # Language files

🤝 Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.


📄 License

GPL-3.0 © TheArmagan


"There will always be something free and valuable on earth."

Made with ❤️ by TheArmagan