How lakki99/save-restricted-content works
This is a Telegram bot that accepts links to restricted posts and sends the referenced content to the requester. The main workflow parses a post or range, obtains a logged-in user session (or configured account), retrieves posts, then downloads and resends their content. Login/logout and admin broadcasts are separate capabilities. The sampled handler excerpt omits some retrieval and dispatch code, so links show only supported interactions; the README documents usage modes not fully visible in the excerpt.
Main entry points: bot.py Bot client · start.py Command and link handlers · generate.py Session login · broadcast.py Broadcast handler
Components 11
Bot runtime
- Bot client
bot.py - Command and link handlers
TechVJ/start.py - Help content
TechVJ/strings.py - Runtime configuration
config.py
Content retrieval
- Link and media handling
TechVJ/start.py
Accounts and users
- Session login
TechVJ/generate.py - User and session store
database/db.py
Administration
- Broadcast handler
TechVJ/broadcast.py
Other components
- Telegram user
- Bot admin
- Telegram
Connections 18
- Telegram user → Bot client: sends commands or links
- Bot admin → Bot client: sends broadcast command
- Bot client → Command and link handlers: dispatches plugins
- Command and link handlers → Help content: uses help text
- Command and link handlers → User and session store: checks and registers users
- Command and link handlers → Link and media handling: handles post links
- Link and media handling → User and session store: reads session
- Link and media handling → Telegram: joins chats and retrieves media
- Link and media handling → Telegram user: sends content and status
- Telegram user → Session login: requests login or logout
- Session login → Telegram: authenticates account
- Session login → User and session store: reads and stores session
- Bot client → Broadcast handler: dispatches plugins
- Broadcast handler → User and session store: lists and removes users
- Broadcast handler → Telegram: copies messages to users
- Bot client → Runtime configuration: reads credentials
- Session login → Runtime configuration: reads API credentials
- Broadcast handler → Runtime configuration: reads admin IDs