The bot operates on a webhook-driven event loop. Incoming Telegram updates hit the FastAPI server, get routed through the conversation handler middleware, and dispatch to the appropriate service layer ...
telegram_bot_template/ ├── bot/ │ ├── config/ # Configuration │ │ ├── __init__.py │ │ ├── settings.py # Pydantic settings │ │ └── constants.py # Application constants │ ├── database/ # Database layer ...