How labriiola/nyp-seg-bot works
This is a Telegram advising bot for Nanyang Polytechnic’s School of Engineering. Users can browse diploma details and cut-off points through inline menus, or ask course-related questions; the message handler adds any selected-diploma context before requesting a Gemini response. Configuration loads the course catalog and credentials, while a separate HTTP health endpoint runs alongside polling. The graph reflects the sampled runtime; the catalog’s internal schema and any deployment-side health-check caller were not inspected.
Main entry points: bot.py Bot runtime · handlers.py Course menus and chat · ai_service.py AI response service · config.py Settings and loader
Components 8
Telegram runtime
- Bot runtime
bot.py - Course menus and chat
handlers.py
Course advising
- Settings and loader
config.py - SEG course catalog
seg_courses.json - AI response service
ai_service.py
Health service
- HTTP health endpoint
server.py
Other components
- Telegram user
- Gemini API
Connections 8
- Telegram user → Bot runtime: sends commands
bot.py - Bot runtime → Course menus and chat: registers handlers
bot.py - Course menus and chat → Settings and loader: reads course data
handlers.py - Settings and loader → SEG course catalog: loads JSON
config.py - Course menus and chat → AI response service: requests answer
handlers.py - AI response service → Settings and loader: uses key and catalog
ai_service.py - AI response service → Gemini API: generates response
ai_service.py - Bot runtime → HTTP health endpoint: starts server
bot.py