A full-featured Discord bot with an integrated web dashboard built for modern Discord servers.
Protection · Moderation · Tickets · Embeds Flow Builder · Auto Roles · Levels · Dashboard · and more.
- Features
- Requirements
- Quick Start — Local (VS Code)
- Hosting on Pterodactyl
- Docker
- Configuration
- MongoDB Migration
- Dashboard Setup
- Project Structure
- Support & Donations
- License
Important
After cloning the project, open settings.json and find the DASHBOARD section.
You must fill in the following fields or the dashboard/bot will not work correctly:
"DASHBOARD": {
"OWNERS": ["YOUR_DISCORD_USER_ID"],
"SHIPS": ["YOUR_DISCORD_USER_ID"],
"CODE": "YOUR_SECRET_ACCESS_CODE",
...
}| Field | Description |
|---|---|
OWNERS |
Your Discord user ID(s). Owners have full access to the dashboard. Add multiple IDs as an array. |
SHIPS |
Discord user ID(s) with elevated/super-admin privileges on the dashboard. |
CODE |
The access code required to log into the dashboard (default is "ADMIN" — change it!). |
How to get your Discord User ID: Enable Developer Mode in Discord → right-click your profile → Copy User ID.
| Category | Highlights |
|---|---|
| 🛡️ Protection | Anti-Ban, Anti-Kick, Anti-Bots, Anti-Webhooks, Anti-Channel Create/Delete, Anti-Role Add/Create/Delete |
| ⚖️ Moderation | Ban, Kick, Mute, Warn, Jail, Clear, Lock/Unlock, Slowmode, Rename, Unban All |
| 👋 Welcome & Leave | Customizable join/leave/boost messages with image cards and welcome role assignment |
| ✅ Verification | Member verification gate with automatic role assignment on completion |
| 👥 Roles | Auto-Role (members / bots / invite), Temp Role, Multi-Role, Permission Control |
| 🎟️ Tickets | Multi-panel, categories, HTML transcripts, Feedback system, Stats, Ticket Points |
| 🤖 Auto Responder | Keyword-triggered auto-replies with exact / contains / regex match modes |
| ⚡ Automations | Event-driven automation rules triggered by Discord events (joins, roles, reactions, …) |
| 📩 Embeds Builder | Visual rich-embed builder with image, thumbnail, fields, footer, and color picker |
| 🧩 Components Builder | Drag-and-drop interactive message builder — buttons, select menus, modals; custom ID routing and flow transitions |
| 💡 Suggestions | Member suggestion submissions with approve/reject dashboard controls |
| 📈 Levels | XP-based leveling system with rank cards, leaderboard, and configurable role rewards |
| ⭐ Staff Points | Reward staff activity with a points system and leaderboard |
| 💬 Interaction Points | Track member engagement (messages, voice) with role-reward thresholds |
| 📊 Activity Stats | Hourly guild activity tracking (joins, leaves, messages, voice) with ApexCharts |
| 🔧 Utility | Server/User info, Avatar, Banners, Ping, AFK, Help |
| 🌐 Dashboard | Discord OAuth2, real-time live editing, guild switcher, full mobile-responsive UI |
| 📝 Logging | Full audit log for every moderation and protection action |
| 🌍 Multi-language | 11 languages: English, Arabic, French, German, Spanish, Russian, Portuguese, Hindi, Bengali, Urdu, Chinese |
- Node.js v20 or higher → Download
- npm v9+ (comes with Node.js)
- A Discord Application with a bot user → Discord Developer Portal
git clone https://github.com/aymenelouadi/Bot-Discord-Dashboard-ALL-IN-ONE---Next-Generation.git
cd "Bot-Discord-Dashboard-ALL-IN-ONE---Next-Generation"npm install# Windows
copy .env.example .env
# Mac / Linux
cp .env.example .envOpen .env in VS Code and fill in your values:
DISCORD_TOKEN=your_bot_token_here
CLIENT_ID=your_application_client_id
CLIENT_SECRET=your_oauth2_client_secret
QAUTH_LINK=http://localhost:2000/auth/discord/redirect
DASHBOARD_PORT=2000
SESSION=any_random_long_string_hereWhere to find these values:
- Go to Discord Developer Portal
- Select your application → Bot tab → copy the Token
- General Information tab → copy Application ID (
CLIENT_ID)- OAuth2 tab → copy Client Secret and add the redirect URL
Edit settings.json to set your prefix, language, and other options:
{
"system": {
"PREFIX": "!",
"COMMANDS": {
"ENABLE_PREFIX": true,
"ENABLE_SLASH_COMMANDS": true,
"STATUS": "ONLINE",
"lang": "en"
}
}
}# Start the bot (also starts the dashboard automatically)
npm startOpen your browser at http://localhost:2000 to access the dashboard.
VS Code tip: Press
Ctrl+Shift+P→ Tasks: Run Task → create anpm: starttask, or simply open a terminal and runnpm start.
Pterodactyl is a game/application panel often used by Discord bot hosts.
- Zip the entire project folder (excluding
node_modules/and.env). - Upload the zip to your Pterodactyl server's File Manager.
- Unzip it in the root of your server directory.
In your Pterodactyl egg settings, set the startup command to:
node index.js
Or if you are using a Node.js egg:
| Field | Value |
|---|---|
| Startup | node {{MAIN_FILE}} |
| Main File | index.js |
| Node.js version | 20 |
In the Pterodactyl panel → Startup tab, add these variables:
| Key | Value |
|---|---|
DISCORD_TOKEN |
Your bot token |
CLIENT_ID |
Your application client ID |
CLIENT_SECRET |
Your OAuth2 client secret |
QAUTH_LINK |
https://yourdomain.com/auth/discord/redirect |
DASHBOARD_PORT |
2000 (or whatever port your egg exposes) |
SESSION |
A long random string |
Make sure port 2000 (or your chosen DASHBOARD_PORT) is allocated and exposed by your host.
Click Start in the Pterodactyl panel. The bot and dashboard will launch together.
# Build the image
docker build -t bot-dashboard .
# Run (replace values with your real credentials)
docker run -d \
-p 2000:2000 \
-e DISCORD_TOKEN=your_token \
-e CLIENT_ID=your_client_id \
-e CLIENT_SECRET=your_client_secret \
-e QAUTH_LINK=http://localhost:2000/auth/discord/redirect \
-e DASHBOARD_PORT=2000 \
-e SESSION=your_session_secret \
--name my-bot \
bot-dashboardOr use Docker Compose — create a docker-compose.yml:
version: "3.9"
services:
bot:
build: .
ports:
- "2000:2000"
environment:
DISCORD_TOKEN: your_token
CLIENT_ID: your_client_id
CLIENT_SECRET: your_client_secret
QAUTH_LINK: http://localhost:2000/auth/discord/redirect
DASHBOARD_PORT: 2000
SESSION: your_session_secret
restart: unless-stoppeddocker compose up -d| Variable | Description |
|---|---|
DISCORD_TOKEN |
Your bot's token (keep this private) |
CLIENT_ID |
Discord Application ID |
CLIENT_SECRET |
OAuth2 secret for the dashboard login |
QAUTH_LINK |
OAuth2 redirect URL (must match Discord dev portal) |
DASHBOARD_PORT |
Port for the web dashboard (default: 2000) |
SESSION |
Random secret string for session encryption |
| Key | Description |
|---|---|
system.PREFIX |
Bot command prefix (default: !) |
system.COMMANDS.lang |
Language: en or ar |
system.COMMANDS.STATUS |
Bot status: ONLINE, IDLE, DND, INVISIBLE |
actions.* |
Per-command role permissions and toggles |
court.* |
Court/complaint system settings |
If you are upgrading from a previous version that used flat-file JSON storage, use the built-in migration script to move all your data into MongoDB safely.
Add the MONGODB connection string to your .env:
MONGODB=mongodb+srv://<user>:<password>@cluster.mongodb.net/next-generationGet a free cluster at https://www.mongodb.com/atlas
migrate.js reads every JSON file from database/ and dashboard/database/<guildId>/
and upserts each record into the matching MongoDB collection:
| JSON source | MongoDB collection |
|---|---|
database/afk.json |
afks |
database/warn.json + warning.json |
warnings |
database/jail.json + jailed.json |
jails |
database/muting.json + records.json |
mutes |
database/temp_role.json |
temproles |
database/auto_role.json |
guilds (→ autoRoles) |
database/auto_responder.json |
guilds (→ autoResponder) |
database/suggestions.json |
guilds (→ suggestionsConfig) |
dashboard/database/<id>/levels.json |
memberlevels |
dashboard/database/<id>/open_tickets.json |
tickets |
dashboard/database/<id>/ticket_feedback.json |
ticketfeedbacks |
dashboard/database/<id>/staff_scores.json |
staffscores |
dashboard/database/<id>/interaction_scores.json |
interactionscores |
dashboard/database/<id>/settings.json, protection.json, … |
guilds |
| Property | Detail |
|---|---|
| Idempotent | Uses findOneAndUpdate + upsert: true — safe to run multiple times, never duplicates |
| Non-destructive | Existing MongoDB documents are only added to / updated, never deleted |
| Expired records skipped | Active mutes, jails, and temp roles past expiresAt are not migrated |
| Stable IDs | Legacy records without a caseId get a deterministic ID (LEGACY_<userId>_<index>) so re-runs always produce the same document |
# Preview — prints what would be migrated without writing anything
node migrate.js --dry-run
# Full migration
node migrate.js| Symbol | Meaning |
|---|---|
✅ |
Record upserted successfully |
⏭️ |
Skipped (empty file, expired record, or dry-run mode) |
❌ |
Individual record failed — error printed, migration continues |
- Go to Discord Developer Portal → your app → OAuth2 → Redirects
- Add your redirect:
http://localhost:2000/auth/discord/redirect(or your domain in production) - Make sure
CLIENT_SECRETandQAUTH_LINKin.envmatch exactly. - Start the bot and navigate to http://localhost:2000
- Click Login with Discord — you'll be redirected to Discord to authorise, then back to the dashboard.
├── commands/ Slash + text commands (one file per command)
├── systems/ Business-logic modules (auto_role, protection, tickets…)
├── dashboard/
│ ├── server.js Express web server entry point
│ ├── routes/ Auth route handlers
│ ├── middleware/ Session & auth guards
│ ├── views/ EJS templates (one per dashboard page)
│ ├── public/ Static assets (JS, CSS)
│ └── utils/ Dashboard helpers (discord API, guildDb…)
├── database/ Flat-file JSON state (gitignored at runtime)
├── utils/ Shared bot utilities (settings, guards, lang…)
├── index.js Bot entry point
├── settings.json Guild configuration
├── .env.example Environment template (copy to .env)
└── Dockerfile Container definition
Got a question or a bug? Join our Discord and open a ticket:
If this project helped you, consider supporting the team:
| Platform | Link |
|---|---|
| ☕ Ko-fi | ko-fi.com/next_generation |
| ⭐ GitHub | github.com/aymenelouadi/next-generation |
Your support helps us keep building and maintaining free, open-source Discord tools. ❤️
This project is licensed under the Apache License — see LICENSE for details.