This is the official Discord bot for YRHacks, York Region's Annual hackathon and Canada's largest high school hackathon.
- User verification through form registrations
- Team creation, management, and invitations
- Profile management
- Logging and error handling
Before setting up the bot, ensure you have the following:
- Python 3.11 or higher
- A supabase account and project
- A Discord bot
- Enable the Privileged Server Members Intent on the Discord Developer Portal
-
Clone the Repository
git clone https://github.com/yrhacks/yrhacks-2025-bot.git cd yrhacks-2025-bot -
Set Up a Virtual Environment
python3 -m venv venv # On Windows: py -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies
pip install -r requirements.txt
-
Set Up the Database
- Copy the schema in
data/schema.sqland execute it in the Supabase SQL editor for your project
- Copy the schema in
-
Configure the Bot
- Duplicate the example files:
cp data/config.example.toml data/config.toml cp .env.example .env cp data/registrations.example.json data/registrations.json
- Edit
data/config.tomlwith your bot's configuration - Edit
.envwith your bot's Discord token and your Supabase credentials - Edit
data/registrations.jsonwith the list of registrations
-
Run the Bot
python3 main.py # On Windows: py main.py
The bot is now up and running!
To deploy the bot with a systemd service—for example, on a Google Cloud Compute VM:
-
Copy the example service file:
cp yrhacks-bot.example.service yrhacks-bot.service
-
Edit
yrhacks-bot.serviceto match your deployment environment -
Move the service file to
/etc/systemd/system/on your deployment machine:sudo mv yrhacks-bot.service /etc/systemd/system/
-
Enable and start the service:
sudo systemctl enable yrhacks-bot sudo systemctl start yrhacks-bot
The bot service will now run in the background!