Modern, modular Discord.js v14 bot framework with advanced features
- 🎛️ Interactive Developer Panel: Button-based bot management interface
- ⚡ Live Code Execution: Execute JavaScript code directly in Discord
- 🔄 Hot Reload: Reload commands/events without restarting the bot
- 🖤 Advanced Blacklist: User blacklisting with reasons and history tracking
- 🔁 Try Again: Re-execute previous code with one click
- 📝 Multi-Command Support: Slash, Prefix, and Context Menu commands
- 🎯 Event System: Organized event management with automatic loading
- ⚙️ Function Loader: Reusable modular functions
- 💾 Database Integration: JSON-based easy data management
- ⏱️ Cooldown System: Built-in command cooldown management
- 🛡️ User Blacklist: Comprehensive blacklisting with timestamps and reasons
- 👮 Permission Control: Role-based access control
- 🚨 Error Handling: Robust error catching and logging
- ✅ Input Validation: Secure input processing and validation
example-bot/
├── 📁 src/
│ ├── 📁 commands/
│ │ ├── 📁 contextMenu/ # Right-click menu commands
│ │ ├── 📁 prefix/ # Traditional prefix commands
│ │ └── 📁 slash/ # Slash commands (/command)
│ ├── 📁 events/
│ │ ├── 📁 command/ # Command-related events
│ │ ├── 📁 developer/ # Developer panel events
│ │ └── 📄 ready.js # Bot ready event
│ ├── 📁 functions/
│ │ ├── 📄 button.js # Button utilities
│ │ ├── 📄 command.js # Command utilities
│ │ ├── 📄 cooldown.js # Cooldown management
│ │ ├── 📄 database.js # Database initialization
│ │ ├── 📄 embed.js # Embed utilities
│ │ ├── 📄 emoji.js # Emoji management
│ │ ├── 📄 json.js # JSON database class
│ │ ├── 📄 log.js # Logging utilities
│ │ └── 📄 utils.js # General utilities
│ ├── 📁 databases/
│ │ ├── 📄 bot.json # Bot data (blacklist, etc.)
│ │ └── 📄 cooldown.json # Cooldown data
│ └── 📁 helpers/
│ └── 📄 topgg.js # Top.gg integration
├── 📁 starter/
│ ├── 📄 bot.js # Bot initialization
│ └── 📁 loader/
│ ├── 📄 command.js # Command loader
│ ├── 📄 event.js # Event loader
│ └── 📄 function.js # Function loader
├── 📄 config.js # Bot configuration
├── 📄 main.js # Entry point
├── 📄 start.bat # Windows startup script
└── 📄 .env # Environment variables
- Node.js 16.9.0 or higher
- Discord Bot Token
- Basic Discord.js knowledge
-
Clone the repository
git clone https://github.com/username/discord-bot-framework.git cd discord-bot-framework -
Install dependencies
npm install
-
Set up environment variables Create a
.envfile:BOT_TOKEN=your_discord_bot_token_here
-
Start the bot
# Windows start.bat # or manually node main.js
The bot includes a comprehensive developer panel accessible through buttons:
- 🔧 Eval: Execute JavaScript code with syntax highlighting
- 🖤 Blacklist: Manage user blacklist with reasons and history
- 🔄 Restart: Reload bot components without full restart
- 🔁 Try Again: Re-execute previous code
- ✅ Blacklist users with custom reasons
- ✅ Edit blacklist reasons with timestamp tracking
- ✅ Remove users from blacklist
- ✅ Full audit trail with user IDs and timestamps
- ✅ Reload commands without bot restart
- ✅ Reload events without bot restart
- ✅ Reload functions without bot restart
- ✅ Clear require cache for fresh code loading
- ✅ Execute JavaScript code in Discord
- ✅ Syntax highlighting for results
- ✅ Error handling and display
- ✅ Code history with "Try Again" functionality
| Package | Version | Description |
|---|---|---|
| discord.js | ^14.21.0 | Discord API wrapper |
| dotenv | ^17.2.0 | Environment variable management |
| chalk | ^5.4.1 | Terminal styling |
| axios | ^1.11.0 | HTTP client |
| lodash | ^4.17.21 | Utility library |
| ms | ^2.1.3 | Time parsing |
| sqlite3 | ^5.1.7 | SQLite database (optional) |
- 🍴 Fork the repository
- 🌿 Create a feature branch (
git checkout -b feature/amazing-feature) - 💾 Commit your changes (
git commit -m 'Add amazing feature') - 📤 Push to the branch (
git push origin feature/amazing-feature) - 🔄 Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Discord.js community for excellent documentation
- Contributors who helped improve this framework
- Everyone who uses and provides feedback
If you have any questions or need help:
- 🐛 Create an issue on GitHub
- 📚 Check the Discord.js documentation
- 💬 Join the Discord.js community server
⭐ Star this repository if you found it helpful!
Build powerful bots with Discord.js 🚀