Skip to content

Mrvishal2k2/TG-RenameBot

Repository files navigation

TG-RenameBot

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.

Requirements

  • Python 3.10+
  • ffmpeg installed on the system
  • PostgreSQL database

Installation (VPS)

git clone https://github.com/mrvishal2k2/TG-RenameBot
cd TG-RenameBot
pip install -r requirements.txt
# set environment variables (see below)
python3 bot.py

Docker

docker build -t tg-renamebot .
docker run --env-file .env tg-renamebot

Copy .env.example to .env and fill in your values.

Environment Variables

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

Commands

/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

Developer

Contributing

Pull requests are welcome. Keep deployment simple and newbie-friendly.

About

Yup an another telegram Rename bot with multiple useful functionz

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors