███████╗██╗ ██╗██████╗ ██████╗ ██╗ ██╗
╚══███╔╝╚██╗ ██╔╝██╔══██╗██╔═══██╗╚██╗██╔╝
███╔╝ ╚████╔╝ ██████╔╝██║ ██║ ╚███╔╝
███╔╝ ╚██╔╝ ██╔══██╗██║ ██║ ██╔██╗
███████╗ ██║ ██║ ██║╚██████╔╝██╔╝ ██╗
╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝
A feature-rich Discord bot paired with a sleek Next.js dashboard
✦ Overview
ZyroX is a fully-featured Discord bot with a modern web dashboard for managing everything from antinuke to music. Built on discord.py v2, FastAPI, and Next.js 14 with Tailwind CSS.
ZyroX-CV2-With-Dashboard/
├── 🤖 bot/ Python Discord bot + FastAPI backend
│ ├── api/ Dashboard REST API (FastAPI)
│ ├── cogs/ All bot features (commands, events, antinuke, automod…)
│ ├── utils/ Shared utilities (emoji, tools, sync…)
│ ├── assets/ Fonts, backgrounds, GIFs
│ └── CodeX.py Entry point
│
└── 🌐 dashboard/ Next.js frontend
├── app/ App Router pages
├── components/ Reusable UI components
├── hooks/ Custom React hooks
└── lib/ API helpers & utilities
✦ Features
|
🛡️ Security
|
🎵 Music
|
|
⚙️ Management
|
🌐 Dashboard
|
|
🎉 Engagement
|
🔧 Developer
|
✦ Quick Start
Prerequisites
| Requirement | Version |
|---|---|
| Python | 3.10 or higher |
| Node.js | 18 or higher |
| A Lavalink node | v4 |
| Discord bot token | — |
| Discord OAuth app | (for dashboard) |
✦ Bot Setup
1 — Clone and enter the bot folder
git clone https://github.com/your-org/ZyroX-CV2-With-Dashboard
cd ZyroX-CV2-With-Dashboard/bot
2 — Create a virtual environment and install dependencies
python -m venv .venv
# Windows
.venv\Scripts\activate
# Linux / macOS
source .venv/bin/activate
pip install -r requirements.txt
3 — Configure the environment
cp .env.example .env
Then edit .env:
# ── Core ──────────────────────────────────────
TOKEN = your_discord_bot_token
brand_name = 'ZyroX'
# ── Lavalink ──────────────────────────────────
LAVALINK_HOST = "lava-v4.ajieblogs.eu.org"
LAVALINK_PASSWORD = "your_password"
LAVALINK_SECURE = "true" # true = https (no port needed)
LAVALINK_PORT = "" # only needed when LAVALINK_SECURE=false
# ── Emoji Sync ────────────────────────────────
EMOJI_SYNC = "true" # auto-uploads & patches emoji.py on startup
# restarts the bot automatically after patching
# ── API / Dashboard Backend ───────────────────
API_ENABLED = "true" # false = skip starting the FastAPI server
API_PORT = "8000"
DASHBOARD_API_KEY = "change_this_to_a_strong_secret"
# ── Webhooks ──────────────────────────────────
WEBHOOK_URL = "https://discord.com/api/webhooks/..."
4 — Run the bot
python CodeX.py
✦ Dashboard Setup
1 — Install dependencies
cd dashboard
npm install
2 — Configure the environment
cp .env.example .env.local
Edit dashboard/.env.local:
NEXT_PUBLIC_API_URL = http://localhost:8000/api/v1
NEXT_PUBLIC_DASHBOARD_API_KEY = your_shared_api_key # must match bot's DASHBOARD_API_KEY
NEXTAUTH_URL = http://localhost:3000
NEXTAUTH_SECRET = a_long_random_string
DISCORD_CLIENT_ID = your_discord_oauth_client_id
DISCORD_CLIENT_SECRET = your_discord_oauth_client_secret
NEXT_PUBLIC_ADMIN_IDS = your_discord_user_id
NEXT_PUBLIC_BRAND_NAME = "ZyroX"
NEXT_PUBLIC_BRAND_NAME_WORD = "ZX"
3 — Run locally
npm run dev
✦ Environment Reference
Bot — bot/.env
| Variable | Default | Description |
|---|---|---|
TOKEN |
— | Discord bot token |
LAVALINK_HOST |
— | Lavalink server hostname (no protocol) |
LAVALINK_PASSWORD |
— | Lavalink password |
LAVALINK_SECURE |
true |
true = HTTPS, false = HTTP |
LAVALINK_PORT |
(empty) | Port — only needed when LAVALINK_SECURE=false |
EMOJI_SYNC |
true |
Run application emoji sync on startup |
API_ENABLED |
true |
Start the FastAPI dashboard backend |
API_PORT |
8000 |
Port the backend listens on |
DASHBOARD_API_KEY |
— | Shared secret between bot API and dashboard |
WEBHOOK_URL |
— | Discord webhook for command logs |
Dashboard — dashboard/.env.local
| Variable | Description |
|---|---|
NEXT_PUBLIC_API_URL |
Full URL to the bot's FastAPI backend |
NEXT_PUBLIC_DASHBOARD_API_KEY |
Must match DASHBOARD_API_KEY in the bot |
NEXTAUTH_URL |
Your dashboard's public URL |
NEXTAUTH_SECRET |
Random secret for NextAuth session signing |
DISCORD_CLIENT_ID |
Discord OAuth2 client ID |
DISCORD_CLIENT_SECRET |
Discord OAuth2 client secret |
NEXT_PUBLIC_ADMIN_IDS |
Comma-separated Discord user IDs with admin access |
NEXT_PUBLIC_BRAND_NAME |
Bot name shown in the dashboard UI |
NEXT_PUBLIC_BRAND_NAME_WORD |
Short abbreviation shown in the dashboard |
✦ Deployment
🤖 Bot — any Python host
- Upload the entire
bot/folder to your host (Render, Railway, Fly.io, VPS…) - Set the start command to
python CodeX.py - Add all environment variables from
.env.example - Make sure port
API_PORT(8000by default) is publicly reachable if you're using the dashboard
Recommended free/cheap hosts: NexioHost · Render · Railway
🌐 Dashboard — Vercel (recommended)
That's literally it — upload the folder, add the variables, done.
Step 1 — Upload to Vercel
Go to vercel.com → Add New Project → drag and drop the dashboard/ folder
(or connect your GitHub repo and set the root directory to dashboard/)
Vercel auto-detects Next.js — no build settings to touch.
Step 2 — Add environment variables
In your Vercel project → Settings → Environment Variables, add these:
| Variable | Value |
|---|---|
NEXT_PUBLIC_API_URL |
Your bot API URL, e.g. https://your-bot.render.com/api/v1 |
NEXT_PUBLIC_DASHBOARD_API_KEY |
Same value as DASHBOARD_API_KEY in the bot .env |
NEXTAUTH_URL |
Your Vercel domain, e.g. https://your-app.vercel.app |
NEXTAUTH_SECRET |
Any long random string — generate one here |
DISCORD_CLIENT_ID |
From Discord Developer Portal |
DISCORD_CLIENT_SECRET |
From Discord Developer Portal |
NEXT_PUBLIC_ADMIN_IDS |
Your Discord user ID |
NEXT_PUBLIC_BRAND_NAME |
ZyroX (or your custom name) |
NEXT_PUBLIC_BRAND_NAME_WORD |
ZX (short version) |
Step 3 — Add the redirect URI in Discord
Go to your app in the Discord Developer Portal
→ OAuth2 → Redirects → add:
https://your-app.vercel.app/api/auth/callback/discord
Step 4 — Deploy
Hit Deploy. Vercel builds and publishes automatically. Your dashboard is live. ✓
✦ Emoji Sync
ZyroX includes an automatic emoji sync system that runs on every startup (when EMOJI_SYNC=true):
★ Starting Application Emoji Sync — 140 unique emojis found in emoji.py
◈ Found 140 templates | Application hosts 98 emojis
↑ Uploading: ztick (not in application emojis)
✔ Uploaded: ztick [saved as ID: 1234567890]
✔ emoji.py patched in-place to reflect current API state.
★ Restarting bot to load updated emoji IDs...
- New emoji → downloaded from CDN, uploaded to your application, ID written to
emoji.py - Stale ID →
emoji.pyis patched automatically - No changes → sync completes instantly, no restart
- After any patch → bot restarts itself so the fresh IDs are live immediately
Set EMOJI_SYNC=false to disable entirely.
✦ Security Notes
- Never commit
.envfiles or real tokens to a public repo —.gitignorealready covers them - Use a strong, unique
NEXTAUTH_SECRETandDASHBOARD_API_KEY - Rotate any secret that gets accidentally exposed
- Keep Discord OAuth credentials in environment variables only
- The bot API should always be behind an API key when publicly hosted
✦ Troubleshooting
| Problem | Fix |
|---|---|
| Bot fails to start | Check TOKEN is set correctly and the bot has the right gateway intents |
| Music not working | Verify LAVALINK_HOST, LAVALINK_SECURE, and LAVALINK_PORT are correct |
| Dashboard shows auth error | Check Discord OAuth client ID/secret and redirect URI in Developer Portal |
| Dashboard can't load data | Confirm API_ENABLED=true, the bot is running, and NEXT_PUBLIC_API_URL is correct |
| Emojis showing as plain text | Run with EMOJI_SYNC=true once to upload and patch IDs |
| Port conflict on API | Change API_PORT in .env and update NEXT_PUBLIC_API_URL in the dashboard |
✦ Credits & Links
✦ License
MIT License — Copyright (c) 2026 CodeX Devs
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
ZyroX — Built for protection. Designed for style.