How vikizv/hb_bot works
HB_Bot is a Telegram birthday-notification bot. Its main flow starts in main.py, checks MySQL for birthdays matching today, requests a personalized greeting from OpenRouter, and sends it to the configured administrator. The bot also handles /start, while the DB class provides person insert and update operations. Edges reflect calls visible in the excerpts or capabilities explicitly documented in the README; configuration is described there but no config.py is present in the tree.
Main entry points: bot.py Bot logic · main.py Entry point · db.py DB operations
Components 7
Bot runtime
- Entry point
main.py - Bot logic
bot.py
Birthday data
- DB operations
db.py
Other components
- Telegram user
- Administrator
- OpenRouter AI
- MySQL
Connections 9
- Entry point → Bot logic: starts check
main.py - Entry point → Bot logic: starts polling
main.py - Bot logic → DB operations: creates and connects
bot.py - Bot logic → MySQL: queries birthdays
bot.py - Bot logic → OpenRouter AI: requests greeting
bot.py - Bot logic → Administrator: sends greeting
bot.py - Telegram user → Bot logic: sends /start
bot.py - Bot logic → Telegram user: replies
bot.py - DB operations → MySQL: connects, inserts, updates
db.py