A Discord bot for managing support tickets organized by folder and channel. Track ticket statuses with role-based workflows and maintain separate leaderboards for Developers and QAs.
β¨ Ticket Management
- Load tickets from markdown files organized in folders
- Create Discord threads for each ticket with status prefixes
- Parse detailed ticket information (problem, steps, acceptance criteria)
- Track ticket status:
[OPEN],[CLAIMED],[Pending-Review],[Reviewed],[CLOSED]
π₯ Role-Based Workflow
- Developers: Claim tickets and mark as Pending-Review
- QAs: Review and approve completed tickets
- Users can have both roles simultaneously
- Use
/set-roleto assign roles
π Role-Based Leaderboards
- Developer leaderboard: Tracks tickets marked as pending review
- QA leaderboard: Tracks tickets reviewed and approved
- Separate scoring for each role
- View with
/leaderboard devor/leaderboard qa
ποΈ Folder Organization
- Organize tickets into different folders (e.g.,
support/,bugs/,features/) - Load tickets from any folder into any Discord channel
- Flexible folder structure
- Load Tickets:
/load-tickets <folder> <channel>creates threads from markdown files - Developer Claims:
/claim <thread>β[CLAIMED][username]ticket-name - Developer Submits:
/resolved <thread>β[Pending-Review][username]ticket-name(adds to dev leaderboard) - QA Reviews:
/reviewed <thread>β[Reviewed][username]ticket-name(adds to QA leaderboard) - Close Ticket:
/closed <thread>β[CLOSED][username]ticket-name
pip install -r requirements.txtEdit .env file and add your Discord bot token:
DISCORD_TOKEN=your_bot_token_here
To get a bot token:
- Go to Discord Developer Portal
- Create a new application
- Go to "Bot" section and click "Add Bot"
- Copy the token and paste it in
.env
- In Developer Portal, go to "OAuth2" > "URL Generator"
- Select scopes:
bot,applications.commands - Select permissions:
Manage Channels,Manage Threads,Send Messages,Embed Links - Copy the generated URL and open it in browser
- Select your server and authorize
Create folders inside the tickets/ directory with your ticket markdown files.
python main.pyBuild the image:
docker build -t website-associate-bot .Run the bot (loads DISCORD_TOKEN from your local .env file):
docker run --rm --env-file .env website-associate-botOptional: mount tickets if you want to edit them locally without rebuilding:
docker run --rm --env-file .env -v $(pwd)/tickets:/app/tickets website-associate-botAssign yourself a role. The Discord role will be created automatically.
Parameters:
role- Choosedeveloperorqa
Example:
/set-role developer
/set-role qa
Load all markdown files from a specified folder into a Discord channel.
Parameters:
folder- Folder name withintickets/directorychannel- Discord channel where threads will be created
Example:
/load-tickets support #support-squad
/load-tickets bugs #bug-reports
Rebuild database entries from existing threads in a Discord channel (PM only).
Parameters:
folder- Folder name withintickets/directorychannel- Discord channel where threads already exist
Example:
/rebuild-db intramurals2026 #support-squad
Mark a ticket as claimed. Must be used inside a ticket thread. Only Developers can use this.
Example workflow:
- Go to the ticket thread
- Run
/claimto claim it
Mark a ticket as pending review. Must be used inside a ticket thread. Only Developers can use this. Adds to developer leaderboard.
Example workflow:
- Go to the ticket thread
- Run
/resolvedto submit for QA review
Approve a ticket after review. Must be used inside a ticket thread. Only QAs can use this. Adds to QA leaderboard.
Requirements:
- Ticket must be in Pending-Review status
- Only QAs can use this
Example workflow:
- Go to the ticket thread (in Pending-Review status)
- Run
/reviewedto approve
Mark a ticket as closed. Must be used inside a ticket thread.
Example workflow:
- Go to the ticket thread
- Run
/closedto close the ticket
Display the leaderboard for a specific role.
Parameters:
role-devfor Developers (default) orqafor QAslimit- Number of top resolvers to show (default: 10, max: 50)
Examples:
/leaderboard dev
/leaderboard qa limit: 20
List all available ticket folders in the tickets/ directory.
Show comprehensive help information about all commands and workflows.
All ticket markdown files should follow this structure:
# Ticket Title
**[PRIORITY]**
## Problem
Clear explanation of the issue, why it matters, and what needs to be fixed.
## Potentially Related Files
- File path and description
- File path and description
## What to Fix
1. First step
2. Second step
3. Third step
## Acceptance Criteria
- Testable condition 1
- Testable condition 2
- Testable condition 3**[PRIORITY]**- Feature blocks other work, critical for MVP**[CRITICAL]**- Production bug, system broken
# Add Daily Facebook Updates Banner to Home Page
## Problem
The home page hero section should include a prominent banner promoting daily updates from the official Facebook page. Currently, no Facebook integration or banner exists.
## Potentially Related Files
- [components/public/home/hero-section.tsx](../app/components/public/home/hero-section.tsx) β Main hero section
- [app/(public)/page.tsx](../app/app/(public)/page.tsx) β Home page entry point
## What to Fix
1. Create Facebook banner section in home page
2. Include a call-to-action button linking to Facebook page
3. Style banner to match existing branding
4. Add copy about daily updates
5. Position banner prominently
6. Make mobile-responsive
## Acceptance Criteria
- Facebook banner is visible on desktop and mobile
- Banner includes link to Facebook page
- Design matches existing aesthetic
- Button opens Facebook in new tabThe bot uses SQLite (tickets.db) to store:
- Thread tracking - Maps Discord threads to ticket information
- User roles - Developer and/or QA roles for each user
- Leaderboard - Separate scores for developers (pending reviews) and QAs (reviewed)
The database is automatically created and initialized on first run.
website-associate-bot/
βββ main.py # Main bot code with commands
βββ config.py # Configuration and environment variables
βββ database.py # SQLite database operations
βββ ticket_loader.py # Markdown file parser
βββ requirements.txt # Python dependencies
βββ .env # Environment variables (Discord token)
βββ .gitignore # Git ignore patterns
βββ tickets.db # SQLite database (auto-created)
βββ tickets/ # Ticket markdown files
βββ support/
β βββ password-reset.md
β βββ login-timeout.md
βββ bugs/
β βββ button-overlap.md
β βββ api-timeout.md
βββ features/
Bot doesn't respond to commands:
- Verify bot has correct permissions in your server
- Check that
DISCORD_TOKENis set correctly in.env - Run
/ticket-foldersto verify bot is working
Role permissions not working:
- Use
/set-roleto assign Developer or QA role first - User must have at least one role to use relevant commands
Tickets not loading:
- Ensure folder exists in
tickets/directory - Check that files have
.mdextension - Verify folder name matches what you pass to
/load-tickets - Check markdown format follows the guidelines
Thread information not displaying:
- Verify markdown file follows the correct format
- Parser will display raw ticket info if parsing fails
- Check bot has permission to post embeds in channel
MIT
For issues or suggestions, contact the development team.