Production-Ready Discord Bot Framework with Modular Architecture
โก Quick Start โข ๐ฏ Commands โข ๐ Documentation โข ๐ค Contribute
Click to expand
| ๐ฎ Latest Discord.js v14.14.1 Most recent Discord API features |
๐งฉ Modular Architecture Clean separation of concerns |
โก Slash Commands Native slash command support |
๐๏ธ Prefix Commands Backward compatibility |
| ๐ก๏ธ Production-Ready Robust error handling |
๐ฆ Lightweight Minimal dependencies |
๐ฅ Hot Reloading Easy development |
๐งฐ Developer-Friendly Simple API |
- โ Node.js 18.0.0+
- โ npm 7.0.0+
- โ Discord Bot Token
# Clone repository
git clone https://github.com/IN3PIRE/discord-js-handler.git
cd discord-js-handler
# Install dependencies
npm install
# Configure environment
cp .env.example .env
nano .env # Add your tokens
# Deploy slash commands
npm run deploy
# Start bot
npm start| Variable | Description | Required |
|---|---|---|
DISCORD_TOKEN |
Bot token from Discord Developer Portal | โ |
CLIENT_ID |
Discord application ID | โ |
GUILD_ID |
Test guild ID (optional) | โ |
| Command | Description |
|---|---|
/ping |
Check bot latency |
/server |
Display server info |
/user |
Show user info |
/userinfo |
User statistics |
/uptime |
Bot uptime |
| Command | Description |
|---|---|
!help |
Display help |
!info |
Bot information |
!time |
Server time |
// src/slashcommands/ping.js
const { SlashCommandBuilder } = require('discord.js');
module.exports = {
data: new SlashCommandBuilder()
.setName('ping')
.setDescription('Check bot latency'),
async execute(interaction) {
await interaction.reply('๐ Pong!');
},
};// src/prefixcommands/help.js
module.exports = {
name: 'help',
description: 'Display commands',
execute(message, args) {
message.reply('Commands: !help, !info, !time');
},
};// src/events/ready.js
module.exports = {
name: 'ready',
once: true,
execute(client) {
console.log(`โ
Ready as ${client.user.tag}`);
},
};npm run deploy # Deploy slash commands
npm start # Start production
npm run dev # Development mode
npm install # Install depsdiscord-js-handler/
โโโ src/
โ โโโ events/ # Event handlers
โ โโโ prefixcommands/ # Prefix commands
โ โโโ slashcommands/ # Slash commands
โ โโโ deploy-commands.js
โ โโโ index.js
โโโ .env.example
โโโ package.json
โโโ README.md
โ ๏ธ IMPORTANT: You must โญ star this repository before your PR can be merged!
- โญ Star the repository
- Find an issue with
good first issuelabel - Comment "I would like to work on this"
- Wait for assignment
- Fork & create branch:
git checkout -b feature/your-feature - Submit PR
good first issue- Perfect for newcomershelp wanted- Extra attention neededbug- Something brokenenhancement- New featuredocumentation- Update docs
| Rank | Contributor | Commits |
|---|---|---|
| ๐ฅ | TrivCodez | 13+ |
| ๐ฅ | Ramanand-Shirbhate | 2 |
| ๐ฅ | KunalTiwari-git | 2 |
| 4 | dromero14521 | 1 |
| 5 | ixhxpns | 1 |
MIT License - see LICENSE for details.
Made with โค๏ธ by the IN3PIRE Team
View Projects โข Join Discord
If you like this project, please give it a โญ star!