How paulsonoflars/tgbot works
Marie is a modular Telegram group-management bot. Users and administrators send commands or messages; the bot dispatches them to moderation, configuration, and group-feature modules, which may consult PostgreSQL and reply or perform Telegram actions. The README documents configurable module loading and capabilities including moderation, notes, user information, filters, and welcomes. The graph preserves those feature areas; source excerpts are incomplete, so links for unsampled features and integrations are documented only where the README supports them.
Main entry points: chat_status.py Permission checks · __init__.py SQL session · log_channel.py Log channel · users_sql.py User and chat data
Components 33
Bot runtime
- Bot startup and help
tg_bot/__main__.py - Configuration and dispatcher
tg_bot/__init__.py
Group moderation
- Admin controls
tg_bot/modules/admin.py - Bans
tg_bot/modules/bans.py - Global bans
tg_bot/modules/global_bans.py - Locks
tg_bot/modules/locks.py - Muting
tg_bot/modules/muting.py - Warnings
tg_bot/modules/warns.py - Flood control
tg_bot/modules/antiflood.py - Blacklists
tg_bot/modules/blacklist.py - Command controls
tg_bot/modules/disable.py
Group features
- Custom filters
tg_bot/modules/cust_filters.py - Saved notes
tg_bot/modules/notes.py - Welcome messages
tg_bot/modules/welcome.py - Group rules
tg_bot/modules/rules.py - Message reporting
tg_bot/modules/reporting.py - RSS feeds
tg_bot/modules/rss.py - User information
tg_bot/modules/userinfo.py - User tracking
tg_bot/modules/users.py - Log channel
tg_bot/modules/log_channel.py
Shared services
- Permission checks
tg_bot/modules/helper_funcs/chat_status.py - User extraction
tg_bot/modules/helper_funcs/extraction.py - Message formatting
tg_bot/modules/helper_funcs/string_handling.py - Command handlers
tg_bot/modules/helper_funcs/handlers.py
Persistence
- Disabled commands
tg_bot/modules/sql/disable_sql.py - Filter data
tg_bot/modules/sql/cust_filters_sql.py - Notes data
tg_bot/modules/sql/notes_sql.py - Warnings data
tg_bot/modules/sql/warns_sql.py - Welcome data
tg_bot/modules/sql/welcome_sql.py - User and chat data
tg_bot/modules/sql/users_sql.py - SQL session
tg_bot/modules/sql/__init__.py
Other components
- Telegram users
- Telegram platform
Connections 44
- Telegram users → Telegram platform: send commands
- Telegram platform → Bot startup and help: deliver updates
tg_bot/__main__.py - Bot startup and help → Configuration and dispatcher: configure runtime
tg_bot/__main__.py - Bot startup and help → Admin controls: load modules
tg_bot/__main__.py - Bot startup and help → Telegram platform: reply to users
tg_bot/__main__.py - Admin controls → Permission checks: check rights
tg_bot/modules/admin.py - Bans → Permission checks: check rights
tg_bot/modules/bans.py - Bans → User extraction: resolve targets
tg_bot/modules/bans.py - Global bans → User and chat data: read user data
tg_bot/modules/global_bans.py - Locks → Permission checks: check rights
tg_bot/modules/locks.py - Locks → User and chat data: read user data
tg_bot/modules/locks.py - Locks → Log channel: log actions
tg_bot/modules/locks.py - Muting → Permission checks: check rights
tg_bot/modules/muting.py - Muting → Log channel: log actions
tg_bot/modules/muting.py - Warnings → Permission checks: check rights
tg_bot/modules/warns.py - Warnings → Warnings data: read and write
tg_bot/modules/warns.py - Warnings → Log channel: log actions
tg_bot/modules/warns.py - Blacklists → Command controls: use command controls
tg_bot/modules/blacklist.py - Blacklists → Permission checks: check rights
tg_bot/modules/blacklist.py - Custom filters → Permission checks: check rights
tg_bot/modules/cust_filters.py - Custom filters → Filter data: read and write
tg_bot/modules/cust_filters.py - Custom filters → User extraction: resolve targets
tg_bot/modules/cust_filters.py - Saved notes → Permission checks: check rights
tg_bot/modules/notes.py - Saved notes → Notes data: read and write
tg_bot/modules/notes.py - Welcome messages → Welcome data: read and write
tg_bot/modules/welcome.py - Welcome messages → Message formatting: format messages
tg_bot/modules/welcome.py - Log channel → Permission checks: check rights
tg_bot/modules/log_channel.py - Log channel → Telegram platform: send logs
tg_bot/modules/log_channel.py - User tracking → User and chat data: read and write
tg_bot/modules/users.py - Configuration and dispatcher → Command handlers: install handlers
tg_bot/__init__.py - Command controls → Disabled commands: read and write
tg_bot/modules/disable.py - Disabled commands → SQL session: use session
tg_bot/modules/sql/__init__.py - Filter data → SQL session: use session
tg_bot/modules/sql/__init__.py - Notes data → SQL session: use session
tg_bot/modules/sql/__init__.py - Warnings data → SQL session: use session
tg_bot/modules/sql/__init__.py - Welcome data → SQL session: use session
tg_bot/modules/sql/__init__.py - User and chat data → SQL session: use session
tg_bot/modules/sql/users_sql.py - Flood control → Telegram platform: moderate messages
- Global bans → Telegram platform: enforce bans
- Saved notes → Telegram platform: send saved notes
- RSS feeds → Telegram platform: post feed updates
- Message reporting → Telegram platform: forward reports
- User information → User and chat data: consult user data
- Group rules → Telegram platform: show rules