Simple telegram bot to download from telegram or web and upload to telegram. For deployment on Termux Powered by @Bots137
- Owner-only access
- Reply-based /download command
- Queue system (max 5 items)
- Always uploads as media
- Auto cleanup after upload
- Clean Termux-friendly logging
- FloodWait handling
- Supports streaming for videos
- Parallel chunk upload
- No concurrent heavy processing for low CPU/RAM footprint
- Support custom file name
- Support Web download now
- Python 3.9+
- ffmpeg
- Download Termux from f-droid here
- Setup termux and install dependencies
pkg update && pkg upgrade -y
pkg install python ffmpeg git -y
pip install --upgrade pip
pip install pyrogram tgcrypto- Run bot:
python bot.pyEdit your Telegram credentials in bot.py:
API_ID = your_id
API_HASH = "your_hash"
BOT_TOKEN = "your_token"
OWNER_ID = your_user_id
Get Telegram variables
- Go to https://my.telegram.org
- Login
- API development tools
- Create app
- Copy API_ID & API_HASH
- Open Telegram
- Search @BotFather
- Get your bot API token
Use custom file name
- Telegram File:
/download custom_name.ext - Web File:
/download URL | File_name.ext
Commands via @BotFather
download - Reply to file
queue - Show queue
cancel - Cancel current task
- Workers set to 12 (balanced for mobile)
- Single file processing (no overheating)
- Queue prevents overload
- If your phone heats: Reduce WORKERS from 12 → 8