How hackerheroop/batra works
This is a Telegram auto-posting bot: users request channel subscriptions and admins review payment details; indexed source-channel media is then scheduled for posting to subscribed channels, with settings and expiry managed alongside it. The graph separates bot entry/routing, subscription administration, media indexing, scheduled delivery, and persistence/health support. Source excerpts show the core calls; payment and admin workflows are only partially excerpted, so omitted internal links are not inferred.
Main entry points: bot.py Bot Runtime · scheduler_tasks.py Scheduled Jobs · payment.py Payment Requests · indexing.py Media Indexing
Components 14
Bot and User Entry
- Bot Runtime
bot.py - Welcome Commands
plugins/start.py - Subscription Listing
plugins/user_commands.py
Subscriptions and Admin
- Payment Requests
plugins/payment.py - Admin Settings
plugins/admin_settings.py
Media Indexing
- Media Indexing
plugins/indexing.py
Scheduled Delivery
- Scheduled Jobs
scheduler_tasks.py
Persistence and Health
- Subscription Records
database.py - Indexed Media
database.py - Settings and Admins
database.py - Health Endpoint
web_server.py - Runtime Configuration
config.py
Other components
- Telegram User
- Telegram Channels
Connections 25
- Telegram User → Bot Runtime: sends commands
bot.py - Bot Runtime → Welcome Commands: registers handlers
bot.py - Bot Runtime → Payment Requests: registers handlers
bot.py - Bot Runtime → Media Indexing: registers handlers
bot.py - Bot Runtime → Admin Settings: registers handlers
bot.py - Bot Runtime → Subscription Listing: registers handlers
bot.py - Welcome Commands → Telegram User: offers purchase
plugins/start.py - Subscription Listing → Subscription Records: reads subscriptions
plugins/user_commands.py - Subscription Listing → Telegram User: shows subscriptions
plugins/user_commands.py - Payment Requests → Subscription Records: manages requests
plugins/payment.py - Payment Requests → Telegram User: requests payment details
plugins/payment.py - Payment Requests → Telegram Channels: logs requests
plugins/payment.py - Admin Settings → Settings and Admins: reads and updates
plugins/admin_settings.py - Admin Settings → Telegram Channels: logs changes
plugins/admin_settings.py - Media Indexing → Settings and Admins: reads settings
plugins/indexing.py - Media Indexing → Indexed Media: stores media
plugins/indexing.py - Media Indexing → Telegram Channels: scans source history
plugins/indexing.py - Bot Runtime → Scheduled Jobs: schedules jobs
bot.py - Scheduled Jobs → Subscription Records: reads active subscriptions
scheduler_tasks.py - Scheduled Jobs → Indexed Media: selects and records media
scheduler_tasks.py - Scheduled Jobs → Settings and Admins: reads job settings
scheduler_tasks.py - Scheduled Jobs → Telegram Channels: posts media
scheduler_tasks.py - Bot Runtime → Health Endpoint: starts server
bot.py - Bot Runtime → Runtime Configuration: loads credentials
bot.py - Subscription Records → Runtime Configuration: gets database settings
database.py