A comprehensive Discord bot + web dashboard for E-Sports team scheduling
Quick Start β’ API Reference β’ Commands β’ Deployment
Valorant Schedule Bot is a full-stack scheduling solution designed for E-Sports teams. It combines Discord's familiar interface with a powerful web dashboard to manage player availability, coordinate training sessions, track scrims, and plan strategies.
- Dual Interface - Discord commands for quick access + Web dashboard for detailed management
- Smart Analysis - Automatically calculates overlapping time windows for all available players
- Automation - Daily schedule posts, reminder notifications, and automated jobs via node-cron
- Role Management - Support for main roster, substitutes, and coaches
- Timezone-Aware - Per-user timezone support with automatic time conversion
- VOD Review - Collaborative video analysis with timestamped comments
- Stratbook - Local strategy management with TipTap rich text editor
- Secure - JWT authentication, bcrypt password hashing, rate limiting, CORS protection
| Feature | Description |
|---|---|
| Interactive Availability | Button-based UI for quick availability updates |
| Smart Schedule Analysis | Detects roster status (full, needs subs, can't proceed) |
| Time Window Calculation | Finds common available time slots |
| Per-User Timezone | Players set their timezone via /set-timezone |
| Recurring Availability | Set weekly default patterns that auto-apply |
| Quick Polls | Custom polls with countdown timer and auto-recovery |
| Training Polls | Vote on preferred training start times |
| Absence Management | Plan absences in advance with automatic marking |
| Feature | Description |
|---|---|
| Schedule Editor | Spreadsheet-like editor for schedule entries |
| Scrim Manager | Track opponents, results, VOD URLs, agent compositions |
| VOD Review | YouTube player with timestamped comments, filtering, mentions |
| Statistics | Availability charts, scrim results, win/loss streaks |
| Stratbook | TipTap editor with folders, map/side filtering, file uploads |
| User Portal | Self-service availability with live database updates |
| Live Logs | Stream bot activity, warnings, and errors |
| Dark Mode | Full dark mode with system preference detection |
- Daily Schedule Posts - Automatic posting at configured time
- Smart Reminders - DM notifications before post time
- Change Notifications - Channel alerts when roster status changes
- Schedule Seeding - Maintains 14-day rolling window automatically
- Node.js v20 or higher
- PostgreSQL 14+ (local or managed service)
- Discord Bot application (setup guide)
# Clone the repository
git clone https://github.com/jonax1337/schedule-bot.git
cd schedule-bot
# Install backend dependencies
npm install
# Install dashboard dependencies
cd dashboard && npm install && cd ..
# Create environment file
cp .env.example .env
# Edit .env with your values (see Configuration section)
# Run database migrations
npx prisma migrate deploy
# Build and start
npm run build
npm start
# Start dashboard (separate terminal)
cd dashboard && npm run dev# Required
DISCORD_TOKEN=your_bot_token
DISCORD_GUILD_ID=your_server_id
DATABASE_URL=postgresql://user:pass@localhost:5432/schedule_bot
ADMIN_USERNAME=admin
ADMIN_PASSWORD_HASH=bcrypt_hash # Generate: node dist/generateHash.js YOUR_PASSWORD
JWT_SECRET=random_32+_char_string
# Optional - Discord OAuth
DISCORD_CLIENT_ID=your_client_id
DISCORD_CLIENT_SECRET=your_client_secret
DISCORD_REDIRECT_URI=http://localhost:3000/auth/callback
# Optional - URLs
DASHBOARD_URL=http://localhost:3000
BOT_API_URL=http://localhost:3001
NEXT_PUBLIC_BOT_API_URL=http://localhost:3001ββββββββββββββββββββ ββββββββββββββββββββ
β β β β
β Discord Server βββββββββββ€ Discord Bot β
β (User Input) β β (discord.js) β
β β β β
ββββββββββββββββββββ ββββββββββ¬ββββββββββ
β
βΌ
βββββββββββββββββββββββββββββ
β Node.js Backend β
β βββββββββββββββββββ β
β β Bot Logic β β
β βββββββββββββββββββ€ β
β β Scheduler β β
β β (node-cron) β β
β βββββββββββββββββββ€ β
β β API Server β β
β β (Express :3001) β β
β βββββββββββββββββββ β
βββββββββββββ¬ββββββββββββββββ
β
βββββββββββββββββΌββββββββββββββββ
βΌ βΌ βΌ
ββββββββββββββ ββββββββββββββ ββββββββββββββ
β PostgreSQL β β Next.js β β Discord β
β (Prisma) β β Dashboard β β OAuth β
β β β :3000 β β (optional) β
ββββββββββββββ ββββββββββββββ ββββββββββββββ
schedule-bot/
βββ src/ # Backend TypeScript
β βββ index.ts # Entry point
β βββ api/ # Express server + routes
β βββ bot/ # Discord bot (commands, events, interactions)
β βββ jobs/ # node-cron scheduler
β βββ repositories/ # Prisma data access layer
β βββ services/ # Business logic
β βββ shared/ # Config, middleware, utils
βββ dashboard/ # Next.js frontend
β βββ app/ # App Router pages
β βββ components/ # React components
β β βββ admin/ # Admin panel
β β βββ user/ # User portal
β β βββ shared/ # Shared components
β β βββ ui/ # Radix UI primitives
β βββ hooks/ # Custom React hooks
β βββ lib/ # Utilities, API client, auth
βββ prisma/ # Database schema + migrations
βββ assets/ # Logo, banner images
| Command | Description |
|---|---|
/schedule [date] |
View team availability for a date |
/schedule-week |
Show next 7 days overview |
/my-schedule |
Your personal 14-day schedule |
/set |
Set your availability interactively |
/set-timezone |
Set your personal timezone |
/set-recurring |
Set recurring weekly availability |
/my-recurring |
View your recurring schedule |
/view-scrims |
View recent match results |
/scrim-stats |
View win/loss statistics |
| Command | Description |
|---|---|
/post-schedule |
Post schedule to channel |
/register @user |
Register user in database |
/unregister @user |
Remove user mapping |
/remind |
Send reminders manually |
/notify |
Send notification to players |
/poll |
Create quick poll |
/add-scrim |
Add scrim result |
- Go to Discord Developer Portal
- Click "New Application" β Enter name β "Create"
- Navigate to "Bot" tab β "Add Bot"
- Copy the token β Save as
DISCORD_TOKEN - Enable SERVER MEMBERS INTENT under Privileged Gateway Intents
- Navigate to "OAuth2" β "URL Generator"
- Select scopes:
bot,applications.commands - Select permissions: View Channels, Send Messages, Embed Links, Add Reactions, Use Slash Commands, Read Message History
- Open the generated URL to invite the bot
- Copy your server ID (Developer Mode) β Save as
DISCORD_GUILD_ID
# Create database
psql -U postgres
CREATE DATABASE schedule_bot;
\q
# Configure DATABASE_URL in .env
DATABASE_URL="postgresql://postgres:password@localhost:5432/schedule_bot"
# Run migrations
npx prisma migrate deploy
# Optional: Open database GUI
npx prisma studioWorks with Railway, Supabase, Neon, or any PostgreSQL provider. Just set the DATABASE_URL connection string.
Deploys Backend + Frontend + PostgreSQL automatically.
git clone https://github.com/jonax1337/schedule-bot.git
cd schedule-bot
cp .env.example .env
# Edit .env with your values
docker compose up -d# Backend
npm run build
npm start
# Dashboard
cd dashboard
npm run build
npm start# Terminal 1: Backend (hot reload)
npm run dev
# Terminal 2: Dashboard
cd dashboard && npm run dev
# Terminal 3: Database GUI (optional)
npx prisma studionpm run build # Build backend
npm run dev # Dev mode (rebuild + start)
npm test # Run tests
npm run test:coverage # Tests with coverage
npm run db:generate # Regenerate Prisma client
npm run db:migrate # Run migrations (dev)
npm run db:studio # Open Prisma Studio- ES Modules - All imports need
.jsextension (even for .ts files) - Date Format - Always use
DD.MM.YYYY(e.g., "24.01.2026") - Availability Format - Empty = no response,
"x"= unavailable,"HH:MM-HH:MM"= time window
The bot runs an Express REST API on port 3001.
- JWT-based (24h expiry)
- Header:
Authorization: Bearer <token> - Admin login:
/api/admin/login - User login:
/api/user/loginor Discord OAuth
# Schedule
GET /api/schedule/next14
POST /api/schedule/update-availability
# User Mappings
GET /api/user-mappings
POST /api/user-mappings
# Scrims
GET /api/scrims
POST /api/scrims
GET /api/scrims/stats/summary
# Strategies
GET /api/strategies
POST /api/strategies
# Actions (Admin)
POST /api/actions/schedule
POST /api/actions/remind
POST /api/actions/poll
# Monitoring
GET /api/health
GET /api/bot-status| Issue | Solution |
|---|---|
| Bot doesn't respond | Check token, permissions, and intents in Developer Portal |
| Database connection fails | Verify DATABASE_URL format, test with npx prisma db pull |
| Dashboard can't connect | Check NEXT_PUBLIC_BOT_API_URL, verify API is running |
| OAuth not working | Verify redirect URI matches exactly in Developer Portal |
| Commands not registering | Ensure GUILDS and GUILD_MEMBERS intents are enabled |
Contributions are welcome! Please:
- 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
- TypeScript strict mode is enabled
- Use async/await for all database operations
- Follow existing code style and patterns
- Add tests for new features
This project is licensed under the MIT License.
- discord.js - Discord API library
- Next.js - React framework
- Shadcn UI - UI components
- Prisma - Database ORM
- TailwindCSS - CSS framework