How enotkiller/telegram-bot-for-college works
This is an asynchronous Telegram bot that answers schedule queries and sends timed lesson notifications. Telegram commands enter through the bot, which uses the system layer for date, week, and lesson calculations and the database layer for schedule and user data; scheduled notifications are sent back through Telegram. The README documents JSON-to-Redis loading and the command set. Excerpts show the main interactions, but do not expose every handler or storage operation, so those relationships are limited to documented or directly supported links.
Main entry points: Bot.py Bot commands · DataBase.py Database access · System.py Time and week logic · Debug.py Debug logging
Components 13
Telegram interaction
- Application entry
main.py - Bot commands
code/Bot.py - Timed notifications
code/Bot.py
Schedule logic
- Time and week logic
code/System.py - Lesson resolution
code/System.py - Lesson cancellations
code/System.py
Data and persistence
- Schedule JSON data
data - Database access
code/DataBase.py - Redis store
- Ping registry
code/DataBase.py - Debug logging
code/Debug.py
Other components
- Students
- Telegram Bot API
Connections 18
- Students → Telegram Bot API: send commands
README.md - Telegram Bot API → Bot commands: delivers messages
README.md - Application entry → Bot commands: starts bot
main.py - Bot commands → Time and week logic: queries time
code/Bot.py - Bot commands → Lesson resolution: requests lessons
code/Bot.py - Bot commands → Database access: reads user data
code/Bot.py - Bot commands → Lesson cancellations: toggles cancellations
code/Bot.py - Timed notifications → Time and week logic: checks schedule
code/Bot.py - Timed notifications → Database access: gets recipients
code/Bot.py - Timed notifications → Telegram Bot API: sends notifications
code/Bot.py - Time and week logic → Database access: reads time settings
code/System.py - Lesson resolution → Database access: gets lesson data
code/System.py - Schedule JSON data → Database access: loads configuration
README.md - Database access → Redis store: reads and writes
code/DataBase.py - Ping registry → Redis store: stores subscribers
code/DataBase.py - Bot commands → Debug logging: logs activity
code/Bot.py - Database access → Debug logging: logs operations
code/DataBase.py - Time and week logic → Debug logging: logs calculations
code/System.py