A Telegram bot to rename/convert media files, written in Python 3 using Pyrogram.
Send any file → pick an action via inline buttons (rename as file/video, convert between file and video) → bot downloads, renames or remuxes, and re-uploads with your saved custom thumbnail.
- Python 3.10+
- ffmpeg installed on the system
- PostgreSQL database
git clone https://github.com/mrvishal2k2/TG-RenameBot
cd TG-RenameBot
pip install -r requirements.txt
# set environment variables (see below)
python3 bot.pydocker build -t tg-renamebot .
docker run --env-file .env tg-renamebotCopy .env.example to .env and fill in your values.
Required:
| Variable | Description |
|---|---|
APP_ID |
Telegram API ID from my.telegram.org |
API_HASH |
Telegram API hash from my.telegram.org |
TG_BOT_TOKEN |
Bot token from @BotFather |
OWNER_ID |
Space-separated user IDs with admin access |
DATABASE_URL |
PostgreSQL connection URI |
Optional:
| Variable | Default | Description |
|---|---|---|
AUTH_USERS |
(everyone) | Space-separated user IDs allowed to use the bot |
DOWNLOAD_LOCATION |
./Bot/DOWNLOADS |
Local path for temporary downloads |
OWNER_USERNAME |
Owner's Telegram username (without @) | |
CUSTOM_CAPTION |
Text appended to file captions after the filename |
/start - start the bot
/help - usage instructions
/showthumb - show your saved custom thumbnail
/deletethumb - delete your saved custom thumbnail
/log - (owner only) get the log file
- Telegram: Mrvishal2k2
- Channel: BotDunia
Pull requests are welcome. Keep deployment simple and newbie-friendly.