The most advanced, modern, and developer-friendly Discord.js v14 bot infrastructure.
Getting Started β’ Features β’ Documentation β’ Examples
| 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 |
npm install @mostfeatured/dbi discord.js// 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;// 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`);
}
});
});// 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}`);
})();// 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!");
})();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}!`);
}
});
});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**!`);
}
});
});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);
}
});
});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 |
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
Contributions are welcome! Feel free to open issues or submit pull requests.
GPL-3.0 Β© TheArmagan
"There will always be something free and valuable on earth."
Made with β€οΈ by TheArmagan