DevBot is a modular, lightweight, and extensible Discord bot engine designed for developers. It features a clean architecture for adding slash commands and independent features, complete with built-in logging and configuration management.
- 🚀 Modular Architecture: Add new commands in
commands/and standalone features infeatures/. - 📂 Auto-Loading: Commands and features are automatically detected and registered.
- 📢 Webhook Logging: Integrated system for logging bot events to a dedicated Discord channel.
- 🎨 Custom Presence: Dynamic status and activity configuration via environment variables.
- 🐳 Docker Ready: Optimized Docker Compose setup for easy deployment.
- Node.js 20+
- npm or yarn
- A Discord Bot Token (get it from the Discord Developer Portal)
-
Clone the repository:
git clone https://github.com/yourusername/devbot.git cd devbot -
Install dependencies:
npm install
-
Configure the environment: Create a
.envfile in the root directory (or copy from a template):cp .env.example .env
Fill in your
DISCORD_TOKENandDISCORD_CLIENT_ID. -
Run the bot:
npm start
The bot is configured entirely through environment variables.
| Variable | Description | Default |
|---|---|---|
DISCORD_TOKEN |
Your Discord Bot Token | Required |
DISCORD_CLIENT_ID |
Your Bot's Application/Client ID | Required |
PRESENCE_ENABLE |
Enable/Disable custom presence | true |
PRESENCE_STATUS |
Bot status (online, idle, dnd, invisible) |
online |
PRESENCE_ACTIVITY |
Activity type (Playing, Streaming, Listening, Watching, Competing, Custom) |
Custom |
PRESENCE_NAME |
The text to display in the activity | Released v... |
PRESENCE_STREAMING_URL |
Twitch/YouTube link (if activity is Streaming) |
|
WEBHOOK_ENABLE |
Enable/Disable Webhook logging | false |
WEBHOOK_URL |
Discord Webhook URL for logs | |
FEATURES_ENABLE |
Globally enable/disable modular features | false |
SHOW_WELCOME |
Show splash message on startup | false |
| Variable | Description |
|---|---|
JTC_ENABLE |
Enable Join-To-Create feature |
JTC_HUB_ID |
Voice channel ID that users join to create a new one |
JTC_CATEGORY_ID |
Category ID where new voice channels will be created |
Add a new .js file to the commands/ directory. It should export an object with data (SlashCommandBuilder) and execute (function):
export const data = {
name: 'hello',
description: 'Says hi!',
};
export async function execute(interaction) {
await interaction.reply('Hello there!');
}Add a new .js file to the features/ directory. Features are functions that receive the client object upon initialization:
export default function (client) {
client.on('messageCreate', (message) => {
// Your logic here
});
};- Encryption/Encoding:
base32,base58,base64,hex,url - Utilities:
qrcode,sha256,ping,speed - Media:
gif
Deploying with Docker is simple:
# Build and start the container
docker-compose up -dYour .env file will be automatically loaded into the container.
This project uses a custom license.
- You may use, modify, and distribute this project for private and internal commercial use without asking for permission.
- Claiming this project as your own original work is strictly prohibited.
- Proper credit to the original author (0xmrcl) must be retained in all distributions and derivative works.
See the LICENSE file for full terms.
Contributions are welcome! Feel free to open issues or submit pull requests to help improve DevBot.
Created by 0xmrcl