BakaBot is a Discord bot and web scraper designed for the Czech online schooling system Bakaláři. Receive real-time updates on new grades, schedule changes, and more directly in your Discord server!
This project is no longer maintained as I no longer have access to the Bakaláři system... Feel free to fork and modify it for your own use though :)
Anyway, here are some of the funniest bits of code I somehow managed to write along the way :P I started on this project back when I was just learning to code, so there are still some gems left inside:
-
`return min(fieldsLen, 4) - 1` the professional way 😎
Lines 169 to 178 in 913958a
-
🪜🎢 `tab`➡️`tab`➡️`tab`➡️ (only 8 indentation deep 🥱)
honorable mentions 🥀BakaBot/src/bot_commands/reactions.py
Lines 108 to 119 in 913958a
BakaBot/src/bot_commands/reactions.py
Lines 35 to 46 in 913958a
Lines 148 to 159 in 913958a
-
Old commit from when main.py was still at its peak 😭🙏
https://github.com/Patai5/BakaBot/blob/b4135ae91a26ff9ddba22b9bcb29909373093431/main.py
- 📅 Schedule Notifications: Get real-time Discord notifications when your school schedule changes.
- 📚 Grade Alerts: Stay up to date with your latest grades, delivered directly to your Discord.
- ☀️ Daily Schedule Reminders: Receive notifications each morning with your schedule for the day.
- ⏰ Upcoming Lessons Alerts: Be notified about upcoming lessons and events.
- 🌐 Bakaláři Server Status: Monitor the current status of your Bakaláři server.
- 📆 Custom Schedule Requests: Use the
/schedulecommand to fetch your schedule for any given day.
- View changes presented in user-friendly HTML/CSS generated images using Pyppeteer
- Get instant updates on your grades with easy-to-read notifications.
- Start your day with a helpful reminder of your upcoming lessons.
- Receive timely alerts for upcoming lessons to stay prepared.
- Monitor the server status to check if Bakaláři is online.
- Easily fetch the schedule for any day with a simple command.
-
Clone the repository:
git clone https://github.com/Patai5/BakaBot.git cd BakaBot -
Setup your
.envfile:Copy the example
.envfile and configure it with your Discord bot credentials.cp .env.example .env
- Discord Token: How to get your Discord token
- Don’t forget to enable all three Privileged Gateway Intents (found under the "Bot" settings).
- Discord ID: How to get your Discord ID
- Discord Token: How to get your Discord token
-
Create a virtual environment (Optional but recommended)
python -m venv env
-
Activate the virtual environment:
- On Windows:
env\Scripts\activate.bat
- On macOS/Linux:
source env/bin/activate
- On Windows:
-
Install dependencies:
pip install -e .(If you're contributing to the project, install development dependencies)
pip install -e .[dev]
-
Install Playwright:
playwright install
-
Start the bot:
python -m src.main
-
Setup the bot: Once the bot is running, use the
/setupcommand in your Discord server to configure it.
To run the bot using Docker, execute:
docker-compose up --build -d