How jony99jrn/diu_drive_bot works
DIU Class Materials Bot is a Telegram service for students to browse course materials and for admins to upload, archive, and manage missing-file reports. Its main student flow is Department → Semester → Course → exam/file list → delivery; admin uploads and channel posts are parsed into catalog records, backed up to a private channel, and stored in Google Sheets. The graph reflects the README and shown calls. Some webhook logic is unsampled, so unverified subsystem links are omitted.
Components 17
Bot entry and interaction
- Webhook handler
api/webhook.js - Parsing and helpers
lib/util.js
Materials catalog
- Catalog browsing
api/webhook.js - File delivery
lib/telegram.js
Admin workflows
- Guided uploads
api/webhook.js - Batch uploads
api/webhook.js - Semester archiving
api/webhook.js - Missing-file reports
api/webhook.js
Persistence and delivery
- Sheets access
lib/sheets.js - Current files
- Archived files
- Pending uploads
- Limits and reports
Other components
- Students
- Admins
- Telegram
- Storage channel
Connections 22
- Telegram → Webhook handler: posts updates
README.md - Webhook handler → Telegram: responds via
api/webhook.js - Students → Telegram: browses and requests
README.md - Admins → Telegram: uploads and manages
README.md - Webhook handler → Catalog browsing: routes callbacks
api/webhook.js - Catalog browsing → Sheets access: reads catalog
api/webhook.js - Catalog browsing → File delivery: requests file send
api/webhook.js - File delivery → Telegram: sends file
lib/telegram.js - Webhook handler → Parsing and helpers: uses parsing
api/webhook.js - Webhook handler → Guided uploads: routes uploads
api/webhook.js - Guided uploads → Sheets access: stores upload state
api/webhook.js - Guided uploads → Storage channel: backs up files
README.md - Webhook handler → Batch uploads: handles batch commands
api/webhook.js - Batch uploads → Sheets access: stores pending state
api/webhook.js - Webhook handler → Semester archiving: routes archive commands
api/webhook.js - Semester archiving → Sheets access: counts and moves
api/webhook.js - Webhook handler → Missing-file reports: handles report actions
api/webhook.js - Missing-file reports → Sheets access: logs and claims
api/webhook.js - Sheets access → Current files: reads and writes
lib/sheets.js - Sheets access → Archived files: reads and moves
lib/sheets.js - Sheets access → Pending uploads: reads and writes
lib/sheets.js - Sheets access → Limits and reports: reads and writes
lib/sheets.js