How thetisiboth/dot works
Ultimate Frisbee Training Bot schedules seasonal practices and sends Telegram announcements, attendance checks, and optional rules quizzes. The main workflow runs from bot startup through scheduling, season-specific training details, message generation, and Telegram delivery; later attendance checks read reactions and may remind the team or notify trainers. Commands provide previews, manual sends, and quiz controls. Separate branches cover the rules-question bank and health monitoring. The README documents MTProto reaction reading and optional Ollama generation; sampled source excerpts show only parts of their wiring, so some integration links are documented rather than source-verified.
Main entry points: app.ts Application startup · RulesQuizService.ts Quiz orchestration · SchedulerService.ts Training scheduler · registry.ts Command routing
Components 22
Bot runtime
- Application startup
src/app.ts - Configuration
src/config/index.ts - Command routing
src/commands/registry.ts - Public commands
src/commands/public.ts - Training commands
src/commands/training.ts - Quiz commands
src/commands/quiz.ts - Health endpoints
src/services/HealthServer.ts
Training workflow
- Training scheduler
src/services/SchedulerService.ts - Season planning
src/services/SeasonManager.ts - Message generation
src/services/MessageGenerator.ts - Telegram delivery helpers
src/utils/telegram.ts
Attendance tracking
- Reaction reader
src/services/ReactionReader.ts
Rules quiz
- Quiz orchestration
src/services/RulesQuizService.ts - Question bank
src/data/rules-quiz/annotations.ts - Quiz selection and posts
src/services/quizPicker.ts - Quiz answers
src/services/quizAnswer.ts - Quiz source data
src/data/rules-quiz/index.ts
Other components
- Admin
- Telegram users
- Telegram Bot API
- MTProto account
- Ollama
Connections 33
- Admin → Telegram Bot API: sends commands
README.md - Telegram users → Telegram Bot API: reacts to posts
README.md - Application startup → Configuration: loads
src/app.ts - Application startup → Command routing: registers
src/app.ts - Application startup → Training scheduler: starts
src/app.ts - Application startup → Season planning: creates
src/app.ts - Application startup → Message generation: creates
src/app.ts - Application startup → Reaction reader: creates
src/app.ts - Application startup → Quiz orchestration: creates
src/app.ts - Application startup → Health endpoints: starts
src/app.ts - Command routing → Telegram Bot API: routes updates
src/commands/registry.ts - Command routing → Public commands: dispatches
src/commands/public.ts - Command routing → Training commands: dispatches
src/commands/training.ts - Command routing → Quiz commands: dispatches
src/commands/quiz.ts - Public commands → Season planning: queries schedule
src/commands/public.ts - Training commands → Training scheduler: requests sends
src/commands/training.ts - Training commands → Message generation: previews messages
src/commands/training.ts - Training scheduler → Season planning: gets training details
src/services/SchedulerService.ts - Training scheduler → Message generation: generates messages
src/services/SchedulerService.ts - Training scheduler → Reaction reader: checks reactions
src/services/SchedulerService.ts - Training scheduler → Quiz orchestration: schedules quiz
src/services/SchedulerService.ts - Training scheduler → Telegram Bot API: sends announcements
README.md - Message generation → Telegram delivery helpers: formats fallback delivery
- Message generation → Ollama: generates optionally
README.md - Reaction reader → MTProto account: reads reactions
README.md - Reaction reader → Telegram Bot API: checks bot messages
README.md - Quiz commands → Quiz orchestration: requests quiz actions
src/commands/quiz.ts - Quiz orchestration → Season planning: selects season mode
src/services/RulesQuizService.ts - Quiz orchestration → Quiz selection and posts: builds quiz post
src/services/RulesQuizService.ts - Quiz orchestration → Quiz answers: builds answers
src/services/RulesQuizService.ts - Quiz orchestration → Quiz source data: looks up questions
src/services/RulesQuizService.ts - Quiz source data → Question bank: assembles question sets
src/data/rules-quiz/index.ts - Quiz orchestration → Telegram Bot API: posts polls
src/services/RulesQuizService.ts