EDGE Rename Bot is a self-hostable Telegram bot built with Pyrogram that lets users rename any file sent to it — with full control over:
- Output file type (Document / Video / Audio)
- Custom caption with dynamic variables
- Custom thumbnail
- Prefix & suffix injection
- Rich media metadata (title, author, artist, audio, subtitle, video) via
ffmpeg - Auto-forward renamed files to a personal dump channel
No more clunky desktop tools. Just send the file, type the new name, done.
| Feature | Description |
|---|---|
| 📁 Rename Any File | Supports documents, videos, and audio up to 2GB |
| 🎥 Choose Output Type | Send as Document, Video, or Audio |
| 🖼️ Custom Thumbnail | Set a persistent thumbnail for all uploads |
| 📝 Custom Caption | Dynamic captions with {filename}, {filesize}, {duration} |
| 🏷️ Prefix & Suffix | Auto-inject tags around filenames |
| 🎬 Metadata Editing | Embed title, author, artist, video/audio/subtitle titles via ffmpeg |
| 📤 Dump Channel | Auto-forward renamed files to your own channel |
| 🔒 Force Subscribe | Restrict bot to channel members only |
| 📊 Admin Stats | CPU, RAM, disk usage dashboard for admins |
| 📣 Broadcast | Send messages to all users (admin only) |
Choose your preferred platform:
# Clone the repo
git clone https://github.com/GeekLuffy/EDGE_RENAME
cd EDGE_RENAME
# Install ffmpeg
sudo apt install ffmpeg -y
# Install dependencies
pip install -r requirements.txt
# Add your config (see variables below)
cp .env.example .env
nano .env
# Run
python bot.py| Variable | Required | Description |
|---|---|---|
BOT_TOKEN |
✅ | Your bot token from @BotFather |
API_ID |
✅ | Telegram App ID from my.telegram.org |
API_HASH |
✅ | Telegram App Hash from my.telegram.org |
DB_URL |
✅ | MongoDB connection string |
DB_NAME |
❌ | Database name (default: Zoro) |
ADMIN |
✅ | Space-separated Telegram user IDs with admin access |
LOG_CHANNEL |
❌ | Channel ID for bot logs (must start with -100) |
DUMP_CHANNEL |
❌ | Default dump channel for all renamed files |
FORCE_SUB_1 |
❌ | Username of first force-subscribe channel (without @) |
FORCE_SUB_2 |
❌ | Username of second force-subscribe channel (without @) |
START_PIC |
❌ | URL of start command media (image or video) |
WEBHOOK |
❌ | Set True if hosting on a web server (default: True) |
⚠️ Note: Server must haveffmpeginstalled for metadata features to work.
/start → Welcome message
/metadata → Toggle metadata embedding on/off
/settitle → Set media title metadata
/setauthor → Set author metadata
/setartist → Set artist metadata
/setaudio → Set audio track title
/setsubtitle → Set subtitle track title
/setvideo → Set video track title
/set_caption → Set custom upload caption
/del_caption → Remove custom caption
/see_caption → View current caption
/set_prefix → Add prefix to filenames
/del_prefix → Remove prefix
/see_prefix → View current prefix
/set_suffix → Add suffix to filenames
/del_suffix → Remove suffix
/see_suffix → View current suffix
/setdump → Set personal dump channel
/viewdump → View current dump channel
/removedump → Remove dump channel
/view_thumb → View saved thumbnail
/del_thumb → Delete saved thumbnail
── Admin Only ──
/stats → System stats (CPU, RAM, disk, users)
/broadcast → Send message to all users
/restart → Restart the bot
EDGE_RENAME/
├── bot.py # Entry point, Pyrogram client init
├── config.py # Config + text constants
├── route.py # Aiohttp web server (for webhook mode)
├── requirements.txt
├── Dockerfile
├── helper/
│ ├── database.py # MongoDB async operations (Motor)
│ └── utils.py # Progress bar, formatters, log sender
└── plugins/
├── rename.py # Core rename + upload + metadata logic
├── start_&_cb.py # /start command + all callback handlers
├── metadata.py # Metadata set commands
├── thumb_&_cap.py # Thumbnail + caption commands
├── prefix_suffix.py # Prefix/suffix set/del/see commands
├── dump_settings.py # Dump channel commands
├── admin_panel.py # Admin stats + broadcast + restart
├── Force_Sub.py # Force subscribe gate
└── antinsfw.py # NSFW filename filter (optional)
docker build -t edge-rename .
docker run -d \
-e BOT_TOKEN=your_token \
-e API_ID=your_id \
-e API_HASH=your_hash \
-e DB_URL=your_mongo_url \
-e ADMIN=your_user_id \
edge-rename- Pyrogram — MTProto Python framework
- Motor — Async MongoDB driver
- Hachoir — Media metadata extraction
- FFmpeg — Media metadata embedding
- Base inspiration: TEAM-PYRO-BOTZ/PYRO-RENAME-BOT
Licensed under Apache 2.0. Free to use, modify, and distribute — keep credits intact. ⭐
Made with ❤️ by GeekLuffy
