A modular Discord bot framework built with TypeScript and discord.js. This is the open-source skeleton that powers Utilara — build your own plugins on top of it.
src/
├── index.ts # Entry point
├── MiniMCBot.ts # Bot client class
├── core/
│ ├── Plugin.ts # Base plugin class
│ ├── PluginManager.ts # Plugin loader
│ ├── CommandHandler.ts # Slash & prefix command handling
│ └── EventHandler.ts # Core Discord event wiring
├── types/
│ ├── BotCommand.ts # Command interface
│ └── BotConfig.ts # Config interface
├── utils/
│ ├── Database.ts # MySQL connection pool
│ └── Logger.ts # Console + file logger
└── plugins/ # Drop your plugins here
npm install
cp env.example .env # Fill in your bot token and database credentials
npm run dev # Development with ts-node
npm run build && npm start # ProductionCreate a folder in src/plugins/ with an index.ts that default-exports a class extending Plugin:
import { Plugin } from "../../core/Plugin";
import { MiniMCBot } from "../../MiniMCBot";
export default class MyPlugin extends Plugin {
public name = "my-plugin";
public version = "1.0.0";
public description = "Does something cool";
constructor(bot: MiniMCBot) {
super(bot);
}
public async initializeDatabase(): Promise<void> {
// Create your tables here
}
public async onLoad(): Promise<void> {
// Register commands, event listeners, etc.
}
public async onUnload(): Promise<void> {
// Cleanup listeners, intervals, etc.
}
}The PluginManager auto-discovers and loads every subdirectory in src/plugins/ on startup.
- Node.js 18+
- MySQL/MariaDB
- A Discord bot token
MIT