A comprehensive Discord Support Ticket Bot with a Web Dashboard.
- Discord Bot: Ticket panels, auto-creations, claiming, closing.
- Web Dashboard: View transcripts, server stats, and manage panels.
- Database: MongoDB for persistent storage.
- Node.js (v18+)
- MongoDB Connection String
- Discord Application (Token, Client ID, Secret)
- Navigate to
/bot. - cp
.env.example.envand fill in your details:DISCORD_TOKEN=... CLIENT_ID=... GUILD_ID=... (Optional, for dev) MONGO_URI=...
- Install dependencies:
npm install - Start the bot:
node src/index.js
- Navigate to
/web. - cp
.env.local.example.env.localand fill in details:MONGO_URI=... DISCORD_CLIENT_ID=... DISCORD_CLIENT_SECRET=... DISCORD_TOKEN=... (Same as bot, needed for editing panels) NEXTAUTH_SECRET=... (Generate with `openssl rand -base64 32`) NEXTAUTH_URL=http://localhost:3000
- Install dependencies:
npm install - Run development server:
npm run dev
Important
When deploying to Vercel, you MUST add DISCORD_TOKEN as an Environment Variable. Without it, editing panels from the web will fail to sync with Discord.
- Discord: Use
/panel createto send a ticket panel to a channel. - Web: Login to
http://localhost:3000/dashboardto view stats and transcripts.
/bot: Discord.js v14 Bot/web: Next.js 14 App Router + TailwindCSS/bot/src/database/schemas: Shared Source of Truth for Schemas (Copies in/web/src/lib/models)