TrackerBot runs three services:
- Discord bot (
bot.js) - handles slash commands, reaction roles, welcome automation, and ticket creation. - Bug intake web server (
webserver.js) - serves the public issue forms and forwards submissions to GitHub. - Admin panel (
adminserver.js) - secured dashboard for Discord admins to push embeds and reaction-role cards.
The bot requires Node.js 18+.
npm installCopy .env.example to .env and fill in every value:
- Discord bot basics:
DISCORD_TOKEN,GUILD_ID - GitHub issue routing:
GITHUB_TOKEN,REPO_DEV,REPO_DATA_REPORT - Channel IDs for the automated posts:
BUG_REPORT_CHANNEL_ID,TICKET_CHANNEL_ID,WELCOME_CHANNEL_ID - Admin panel OAuth:
DISCORD_CLIENT_ID,DISCORD_CLIENT_SECRET,DISCORD_REDIRECT_URI,PANEL_ADMIN_ROLE_ID,ADMIN_PANEL_PORT - Web server port overrides:
PORT
Tip:
GITHUB_TOKENneedsreposcope (or equivalent granular access) to create issues in the configured repositories.
npm startThis launches the bot, issue intake web server, and admin panel in parallel. Logs for each service are prefixed with bot, web, or admin.
npm run start:bot # Discord bot
npm run start:web # Public issue forms (http://localhost:3000)
npm run start:admin # Admin panel (http://localhost:4001)- Bot login success is logged as soon as Discord authenticates the token.
webserver.jsserveshttp://localhost:3000(issue portal), plushttp://localhost:3000/issueandhttp://localhost:3000/data(forms).adminserver.jsrequires Discord OAuth with thePANEL_ADMIN_ROLE_ID.
npm install -g pm2
pm2 start bot.js --name TrackerBot
pm2 save
pm2 startup- Use
deploy-test.shordeploy-prod.shas references for installing dependencies and restarting the PM2 processes on servers. - The bot registers global slash commands on startup. When adding commands, allow up to one hour for Discord to propagate them globally.
- When rotating credentials, restart all services so environment variables are reloaded.