Skip to content

Repository files navigation

Digital Rename Bot

Typing SVG

Digital Rename Bot

Fast, reliable Telegram file renaming and metadata bot
Rename files, customize captions, add thumbnails, edit metadata, and manage uploads from Telegram.

Latest GitHub release License Issues

What it does

Digital Rename Bot is a Pyrogram-based Telegram bot for quickly renaming documents, videos, and audio files. It also supports thumbnails, custom captions, prefix/suffix rules, FFmpeg metadata editing, force subscription, premium plans, broadcasts, and admin moderation tools.

Highlights

  • Fast file renaming with document, video, and audio output options.
  • 2 GB support by default and larger-file support with a valid premium string session.
  • Custom filename prefix and suffix.
  • Permanent thumbnails and custom captions with {filename}, {filesize}, and {duration} placeholders.
  • FFmpeg metadata editing for title, author, video, audio, and subtitle streams.
  • Daily upload limits, premium plans, and a 12-hour free trial.
  • Force-subscription, ban/unban, broadcast, logs, and status commands.
  • Responsive web status dashboard.
  • Throttled Pyrogram progress updates to avoid Telegram flood limits.

Requirements

  • Python 3.11+
  • Telegram Bot Token from @BotFather
  • Telegram API_ID and API_HASH from my.telegram.org
  • MongoDB connection string from MongoDB Atlas
  • FFmpeg installed on the host (included in the Docker image)
  • A Telegram premium user string session for files larger than 2 GB

Configuration

Set these environment variables before starting the bot:

Variable Required Description
BOT_TOKEN Yes Telegram bot token from BotFather
API_ID Yes Telegram application ID
API_HASH Yes Telegram application hash
DB_URL Yes MongoDB connection URI
DB_NAME No MongoDB database name; default: Digital_Rename_Bot
ADMIN Yes Space-separated admin user IDs; at least one numeric ID is required and the first numeric ID is used for the premium contact button
ADMIN_USERNAME Yes Telegram username fallback for the premium contact button, with or without @
FORCE_SUB No Channel username or channel ID for force subscription
LOG_CHANNEL Yes Channel ID for logs; leave empty to disable
STRING_SESSION No Premium user session for 2 GB+ file support
RKN_PIC No Start-message image URL
PORT No Web status port; default: 8080

Never commit tokens, API hashes, database credentials, or string sessions to GitHub.

Local installation

git clone https://github.com/DigitalBotz/Digital-Rename-Bot.git
cd Digital-Rename-Bot
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python bot.py

For Docker:

docker build -t digital-rename-bot .
docker run --env-file .env -p 8080:8080 digital-rename-bot

The web dashboard is available at http://localhost:8080 when the bot is running.

Botfather Commands

start - 𝖈ʜᴇᴄᴋ 𝖎 𝖆ᴍ ʟɪᴠᴇ.
plans - ᴜᴘɢʀᴀᴅᴇ ᴛᴏ ᴘʀᴇᴍɪᴜᴍ ᴘʟᴀɴ.
myplan - ᴄʜᴇᴄᴋ ʏᴏᴜʀ ᴘʀᴇᴍɪᴜᴍ ᴘʟᴀɴ ʜᴇʀᴇ.
view_thumb - 𝖙ᴏ 𝖘ᴇᴇ 𝖞ᴏᴜʀ 𝖈ᴜ𝖘ᴛᴏᴍ 𝖙ʜᴜᴍʙɴᴀɪʟ !!
del_thumb - 𝖙ᴏ 𝖉ᴇʟᴇᴛᴇ 𝖞ᴏᴜʀ 𝖈ᴜ𝖘ᴛᴏᴍ 𝖙ʜᴜᴍʙɴᴀɪʟ !!
set_caption - Sᴇᴛ A Cᴜsᴛᴏᴍ Cᴀᴘᴛɪᴏɴ !!
see_caption - Sᴇᴇ Yᴏᴜʀ Cᴜsᴛᴏᴍ Cᴀᴘᴛɪᴏɴ !!
del_caption - Dᴇʟᴇᴛᴇ Cᴜsᴛᴏᴍ Cᴀᴘᴛɪᴏɴ !!
metadata - Tᴏ Sᴇᴛ & Cʜᴀɴɢᴇ ʏᴏᴜʀ ᴍᴇᴛᴀᴅᴀᴛᴀ ᴄᴏᴅᴇ
set_prefix - Tᴏ Sᴇᴛ Yᴏᴜʀ Pʀᴇғɪx !!
see_prefix - Tᴏ Sᴇᴇ Yᴏᴜʀ Pʀᴇғɪx !!
del_prefix - Dᴇʟᴇᴛᴇ Yᴏᴜʀ Pʀᴇғɪx !!
set_suffix - Tᴏ Sᴇᴛ Yᴏᴜʀ Sᴜғғɪx !!
see_suffix - Tᴏ Sᴇᴇ Yᴏᴜʀ Sᴜғғɪx !!
del_suffix - Dᴇʟᴇᴛᴇ Yᴏᴜʀ Sᴜғғɪx !!
restart - ᴛᴏ ʀᴇsᴛᴀʀᴛ ᴛʜᴇ ʙᴏᴛ ᴀɴᴅ sᴇɴᴅ ᴍᴇssᴀɢᴇ ᴀʟʟ ᴅʙ ᴜsᴇʀs (Aᴅᴍɪɴ Oɴʟʏ)
addpremium - ᴀᴅᴅ ᴘʀᴇᴍɪᴜᴍ (Aᴅᴍɪɴ Oɴʟʏ)
remove_premium - ʀᴇᴍᴏᴠᴇ ᴘʀᴇᴍɪᴜᴍ (Aᴅᴍɪɴ Oɴʟʏ)
ban - ban members using command (admin only)
unban - unban members using command (admin only)
banned_users - check bot all ban users using command (admin only)
logs - ᴄʜᴇᴄᴋ ʙᴏᴛ ʟᴏɢs (Aᴅᴍɪɴ Oɴʟʏ)
status - Cʜᴇᴄᴋ Bᴏᴛ Sᴛᴀᴛᴜs (Aᴅᴍɪɴ Oɴʟʏ)
broadcast - Sᴇɴᴅ Mᴇssᴀɢᴇ Tᴏ Aʟʟ Usᴇʀs (Aᴅᴍɪɴ Oɴʟʏ)

Custom caption example

/set_caption 📁 File: {filename}
💾 Size: {filesize}
⏱ Duration: {duration}

Metadata example

--change-title My Title
--change-video-title Video Stream
--change-audio-title Audio Stream
--change-subtitle-title Subtitle Stream
--change-author Digital Botz

Deployment

The project includes deployment files for Docker and common Python hosting platforms. Before deploying, add the required environment variables in the provider's secrets/settings panel. Do not put credentials directly in README.md, render.yaml, app.json, or source files.

Render

Deploy to Render

The repository includes render.yaml. Add BOT_TOKEN, API_ID, API_HASH, DB_URL, ADMIN, and the optional variables in Render environment settings.

Koyeb

Deploy this repository on Koyeb

Set the required environment variables and use python bot.py as the run command.

Railway

Open Railway

Create a project from this GitHub repository, then add the environment variables from the Configuration table. The default start command is python bot.py.

Heroku-compatible platforms

Deploy to Heroku

The repository includes app.json, Procfile, and runtime.txt for Heroku-compatible deployment.

Deployment note: Free hosting plans may sleep, limit disk space, or restrict long-running file transfers. For reliable 24/7 operation and large files, use a suitable paid or persistent worker/server.

Version 3.1.2

  • Improved code and final 100% updates.
  • Fixed metadata button issues.
  • Improved filename sanitization and upload cleanup.
  • Fixed premium database method and quota rollback bugs.
  • Fixed FFmpeg subprocess handling and metadata fallback.

Credits and license

This repository is a modified and maintained version of the Digital Rename Bot project. The original copyright and attribution notices are retained in the source files.

Original project credits

If you redistribute this repository or a derivative work:

  1. Keep the original copyright, attribution, and license notices.
  2. Include a copy of the Apache License 2.0.
  3. Clearly mark files that you changed, as required by the license.
  4. Do not imply that the original authors endorse your modified version.

This project is provided under the Apache License 2.0. The license permits modification and redistribution subject to its terms; credits and notices must not be removed.

For bug reports and support, contact Digital Botz Support.

Last updated: 04 October 2026, 12:52 PM NPT (UTC+05:45)
Current version: 3.1.2

About

This is a Powerful Telegram File Changer Bot that can change Name, Thumbnail, Prefix, Suffix, Metadata and Caption with High Speed.

Topics

Resources

Security policy

Stars

100 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages