How shlokdhakrey/gbu-timetable-bot works
GBU Timetable Bot has two implementations: a Python long-polling bot and an n8n workflow. Students choose a school, program, section, and optional lab batch; the bot then answers timetable queries and sends scheduled summaries and reminders. In Python, bot.py orchestrates message handling and clock ticks, while timetable.py normalizes and caches university data, replies.py routes actions, and reminders.py handles scheduled delivery. The README documents the n8n counterpart; its internal node-level relationships are not represented in the sampled source.
Main entry points: reminders.py Scheduled messages · bot.py Bot loop · timetable.py Timetable processing · replies.py Request routing
Components 15
Python runtime
- Bot loop
bot.py - Request routing
replies.py - Message formatting
messages.py - Telegram API client
telegram_api.py - Settings
config.py
Timetable data
- Timetable processing
timetable.py
Student state
- Student records
students.py - Scheduled messages
reminders.py - Sent-message state
n8n workflow
- n8n bot workflow
n8n/gbu-timetable-bot.json - n8n student table
n8n/gbu-timetable-bot.json
Other components
- Student
- Schedule clock
- GBU timetable sources
- Telegram service
Connections 25
- Student → Bot loop: sends updates
README.md - Schedule clock → Bot loop: triggers checks
README.md - Bot loop → Telegram API client: polls updates
bot.py - Bot loop → Request routing: dispatches updates
bot.py - Bot loop → Scheduled messages: runs ticks
bot.py - Bot loop → Timetable processing: refreshes data
bot.py - Request routing → Student records: reads and updates
replies.py - Request routing → Timetable processing: queries classes
replies.py - Request routing → Message formatting: builds replies
replies.py - Request routing → Telegram API client: sends replies
replies.py - Message formatting → Timetable processing: uses day and time data
messages.py - Scheduled messages → Timetable processing: queries classes
reminders.py - Scheduled messages → Student records: loads recipients
reminders.py - Scheduled messages → Message formatting: formats notices
reminders.py - Scheduled messages → Telegram API client: delivers notices
reminders.py - Scheduled messages → Sent-message state: records deliveries
reminders.py - Timetable processing → GBU timetable sources: fetches timetable
timetable.py - Telegram API client → Telegram service: calls Bot API
telegram_api.py - Settings → Timetable processing: configures sources and periods
timetable.py - Settings → Telegram API client: configures API endpoint
telegram_api.py - Student → n8n bot workflow: sends messages
README.md - Schedule clock → n8n bot workflow: triggers schedule
README.md - n8n bot workflow → n8n student table: reads and saves students
README.md - n8n bot workflow → Telegram service: sends bot messages
README.md - n8n bot workflow → GBU timetable sources: fetches timetable
README.md