A Discord bot for managing mentorship tickets during hackathons.
Tool guide: Notion Link
- Google Cloud CLI installed and authenticated
- Discord Bot Token from Discord Developer Portal
- Firebase Project with Firestore database
- Firebase Service Account credentials
Set these environment variables before deployment:
export DISCORD_TOKEN="your_discord_bot_token"
export FIREBASE_PROJECT_ID="your_firebase_project_id"
export FIREBASE_CREDENTIALS='{"type":"service_account","project_id":"...","private_key":"...","client_email":"..."}'
# Deploy to Cloud Run
./cloud-run-deploy.sh your-project-id us-central1
# Set your project
gcloud config set project your-project-id
# Enable required APIs
gcloud services enable run.googleapis.com
gcloud services enable cloudbuild.googleapis.com
# Deploy
gcloud run deploy garudabot \
--source . \
--platform managed \
--region us-central1 \
--allow-unauthenticated \
--memory 512Mi \
--cpu 1 \
--timeout 3600 \
--max-instances 1 \
--set-env-vars "DISCORD_TOKEN=$DISCORD_TOKEN,FIREBASE_PROJECT_ID=$FIREBASE_PROJECT_ID,FIREBASE_CREDENTIALS=$FIREBASE_CREDENTIALS"
-
Configure Discord Bot:
- Add bot to your Discord server
- Grant necessary permissions
-
Set up channels:
!setup
-
Post ticket interface:
!post_interface
# View logs
gcloud logs tail --service=garudabot --region=us-central1
# Get service URL
gcloud run services describe garudabot --region=us-central1 --format='value(status.url)'
# Install dependencies
pip install -r requirements.txt
# Set environment variables
cp .env.example .env
# Edit .env with your credentials
# Run bot
python main.py
!create
- Create a new ticket!list
- List your tickets!info <ticket_id>
- Get ticket information!close_ticket <ticket_id>
- Close your ticket
!mentor tickets
- View all open tickets!mentor accept <ticket_id>
- Accept a ticket!mentor resolve <ticket_id>
- Resolve a ticket!mentor assign <ticket_id> <user>
- Assign ticket to another mentor!mentor my
- View your assigned tickets
!setup
- Configure channels interactively!post
- Post the ticket creation interface (Manual)
- Discord.py - Discord bot framework
- Firebase Firestore - Database
- Google Cloud Run - Hosting platform
- Docker - Containerization