Production-ready Discord.js v14 bot handler with slash commands, event system, and modular architecture.
- ✨ Built for Discord.js v14.14.1 (latest)
- 🚀 Modular command/event system
- 🔧 Easy deployment with slash commands
- 🛡️ Production-ready error handling
- 📦 Lightweight with minimal dependencies
- Clone the repository
- Install dependencies:
npm install - Copy
.env.exampleto.envand fill in your values - Deploy commands:
npm run deploy - Start the bot:
npm start
DISCORD_TOKEN- Your bot token from Discord Developer PortalCLIENT_ID- Your Discord application IDGUILD_ID- Your test guild ID (optional, for guild-specific commands)
/ping- Basic ping command/server- Display server information/user- Display user information
Create a new file in src/commands/ with the following structure:
const { SlashCommandBuilder } = require('discord.js');
module.exports = {
data: new SlashCommandBuilder()
.setName('commandname')
.setDescription('Description here'),
async execute(interaction) {
// Command logic here
},
};Create a new file in src/events/ with the following structure:
module.exports = {
name: 'eventName',
once: true, // or false for recurring events
execute(...args) {
// Event logic here
},
};MIT