How arbuz7277/arbot works
Arbot is a modular aiogram Telegram-bot starter. Its main workflow starts polling, dispatches Telegram updates through registered handlers and callbacks, and returns replies to users; the /start handler also builds an inline menu. The template includes a ping command, an about callback, password-generation handler, middleware, configuration, and an SQLite access layer. The password handler is present in the tree and registered by the handler package, but its implementation was not sampled; other edges are limited to relationships visible in excerpts or the README.
Main entry points: main.py Bot entry and polling · __init__.py Handler registration · start.py Start command · ping.py Ping command
Components 15
Bot runtime
- Bot entry and polling
main.py - Handler registration
handlers/__init__.py - Callback registration
callbacks/__init__.py
User interactions
- Start command
handlers/start.py - Ping command
handlers/ping.py - Password command
handlers/gen_password.py - Inline menu
keyboards/inline/main.py - About callback
callbacks/about.py
Middleware
- Middleware registration
middlewares/__init__.py - Example middleware
middlewares/example.py
Configuration and data
- Bot configuration
config.py - Database access
database/database.py
Other components
- Telegram user
- Telegram API
- SQLite database
Connections 20
- Telegram user → Bot entry and polling: sends updates
main.py - Bot entry and polling → Telegram API: polls updates
main.py - Bot entry and polling → Handler registration: registers handlers
main.py - Bot entry and polling → Callback registration: registers callbacks
main.py - Bot entry and polling → Middleware registration: registers middleware
main.py - Handler registration → Start command: includes router
handlers/__init__.py - Handler registration → Ping command: includes router
handlers/__init__.py - Handler registration → Password command: includes router
handlers/__init__.py - Callback registration → About callback: includes router
callbacks/__init__.py - Middleware registration → Example middleware: registers middleware
middlewares/__init__.py - Example middleware → Bot entry and polling: passes event onward
middlewares/example.py - Start command → Inline menu: builds menu
handlers/start.py - Start command → Telegram user: replies
handlers/start.py - Ping command → Telegram API: checks bot identity
handlers/ping.py - Ping command → Telegram user: replies with latency
handlers/ping.py - About callback → Telegram user: edits message
callbacks/about.py - Bot entry and polling → Bot configuration: reads bot settings
main.py - Bot entry and polling → Database access: connects and closes
main.py - Database access → Bot configuration: reads database path
database/database.py - Database access → SQLite database: executes queries
database/database.py