How kaguya2021/kaguya2_0_bot works
Kaguya is a Telegram bot for configurable automatic replies, managed through commands and inline settings. Users configure reply text, schedules, reply mode, timer mode and an allowed account; the bot processes incoming business messages and can also support admin user management and broadcasts. The runtime entry point exposes an Express webhook for Telegram and sets that webhook on startup. Bot handlers use the database module for persistent user settings, pauses and error logs. The excerpt is partial, so unshown handler-to-feature relationships are omitted; the README provides no additional capability evidence.
Main entry points: bot.js Bot handlers · index.js Webhook server · database.js Database operations
Components 10
Bot runtime
- Webhook server
index.js - Bot handlers
bot.js
Reply management
- Reply configuration
bot.js - Auto-reply processing
bot.js - Account settings
bot.js - Admin commands
bot.js
Persistence
- Database operations
database.js - Postgres database
Other components
- Telegram user
- Telegram API
Connections 12
- Telegram user → Telegram API: sends messages
- Telegram API → Webhook server: delivers webhook
index.js - Webhook server → Bot handlers: dispatches updates
index.js - Telegram user → Bot handlers: uses commands
bot.js - Bot handlers → Telegram API: sends replies
bot.js - Bot handlers → Reply configuration: handles settings
bot.js - Bot handlers → Auto-reply processing: handles messages
bot.js - Bot handlers → Account settings: handles account options
bot.js - Bot handlers → Admin commands: handles admin actions
bot.js - Bot handlers → Database operations: calls
bot.js - Database operations → Postgres database: queries
database.js - Webhook server → Telegram API: sets webhook
index.js