How codeflix-bots/manga-bot works
Manga Bot is a Pyrogram-based Telegram manga downloader. Users search manga sources, browse chapters, request a chapter, and receive it in selected formats; subscriptions also drive periodic update checks and queued delivery. The bot coordinates source clients, downloads chapter images, creates PDF/CBZ or Telegraph output, and stores user preferences, subscriptions, and reusable file identifiers. The bot excerpt is partial, so some handler-to-service wiring and conversion details are omitted where not directly evidenced.
Main entry points: bot.py Delivery workers · plugins Source clients · db.py Application database · main.py Runtime startup
Components 16
Telegram interaction
- Bot handlers
bot.py - Runtime startup
main.py
Manga sources
- Manga client base
plugins/client.py - Source clients
plugins - Search ranking
plugins/search_engine.py
Chapter delivery
- Chapter queue
tools/aqueue.py - Delivery workers
bot.py - PDF and thumbnail
img2pdf/core.py - CBZ packaging
img2cbz/core.py - Telegraph pages
img2tph/core.py
Persistence and updates
- Application database
models/db.py - Subscription updater
bot.py
Other components
- Telegram user
- Telegram API
- Manga websites
- Telegraph
Connections 24
- Telegram user → Telegram API: sends commands
- Telegram API → Bot handlers: dispatches updates
- Bot handlers → Telegram API: replies and sends
- Bot handlers → Source clients: searches and browses
- Source clients → Manga client base: uses base behavior
- Source clients → Manga websites: requests manga data
- Source clients → Search ranking: ranks results
- Bot handlers → Application database: reads and writes
- Bot handlers → Chapter queue: enqueues chapters
- Runtime startup → Application database: connects
- Runtime startup → Subscription updater: starts
- Runtime startup → Delivery workers: starts workers
- Subscription updater → Application database: reads subscriptions
- Subscription updater → Source clients: checks chapter updates
- Subscription updater → Chapter queue: enqueues new chapters
- Delivery workers → Chapter queue: dequeues chapters
- Delivery workers → Source clients: downloads chapter images
- Delivery workers → Application database: reads files and options
- Delivery workers → PDF and thumbnail: creates PDF output
- Delivery workers → CBZ packaging: creates CBZ output
- Delivery workers → Telegraph pages: creates page output
- Telegraph pages → Telegraph: publishes page
- Delivery workers → Telegram API: sends chapter output
- Delivery workers → Application database: records file identifiers