Telegram Advanced File to Link Bot
Convert files to links for easy streaming and downloading with advanced features using Hydrogram.
🐞 Report a Bug | ✨ Request a Feature
📋 Table of Contents
-
Streamlined Code: Unnecessary features removed for efficiency.
-
High Speed: Utilizes Hydrogram for faster operation.
-
Easy Deployment: Fully configured for Heroku.
-
Enhanced Functionality: Improved user interface and additional features:
- 👤 User-Friendly Interface
- 🔗 Stream Links
- 👥 Group Functionality
- 📂 Retrieve Files
- 🔄 Update Channel
- 📋 Log Channel
- ⚖️ Terms & Conditions
- ❌ Delete Links
- 📢 Broadcasts (Admin)
- 🚫 Ban User (Admin)
- ✅ Unban User (Admin)
- 🔢 Link Limits
View All Commands (Click to expand)
start - Start the bot
link - Generate a stream link
help - Bot usage details
myfiles - Retrieve all files
ban - (Admin) Ban users
unban - (Admin) Unban users
stats - (Admin) Bot usage stats
who - (Admin) Check sender of a file
YasirRoBotv3 is a modified version of HydroStreamerBot.
Press the button below to deploy on Heroku:
Then go to the variables tab for more info on setting up environmental variables.
git clone https://github.com/yasirarism/YasirRoBotv3
cd YasirRoBotv3
python3 -m venv ./venv
. ./venv/bin/activate
pip3 install -r requirements.txt
python3 -m YasirRoBot
To stop the bot:
Ctrl + C
If you want to run the bot 24/7 on VPS:
sudo apt install tmux -y
tmux
python3 -m YasirRoBot
Now you can close the VPS, and the bot will keep running.
If you're on Heroku, just add these to the Environmental Variables. If you're hosting locally, create a .env
file in the root directory and add all the variables there. Example .env
file:
API_ID=
API_HASH=
BOT_TOKEN=
BIN_CHANNEL=
DATABASE_URL=
FQDN=
HAS_SSL=
MULTI_TOKEN1=
MULTI_TOKEN2=
MULTI_TOKEN3=
OWNER_ID=
PORT=
API_ID
: Get it from my.telegram.org.API_HASH
: Get it from my.telegram.org.BOT_TOKEN
: Get the bot token from @BotFather.BIN_CHANNEL
: Create a new channel (private/public), post something in your channel, forward that post to @missrose_bot, and reply with/id
. Copy the forwarded channel ID here.OWNER_ID
: Your Telegram User ID. Send/id
to @missrose_bot to get it.DATABASE_URL
: MongoDB URI for saving user IDs for broadcasting.
SLEEP_THRESHOLD
: Flood wait exception threshold. Defaults to 60 seconds.WORKERS
: Maximum concurrent workers. Defaults to 6.PORT
: Port for the web app. Defaults to 8080.WEB_SERVER_BIND_ADDRESS
: Server bind address. Defaults to0.0.0.0
.NO_PORT
: IfTrue
, the port is not displayed. Defaults toFalse
.FQDN
: Fully Qualified Domain Name. Defaults toWEB_SERVER_BIND_ADDRESS
.HAS_SSL
: IfTrue
, generated links are in HTTPS format. Defaults toFalse
.PING_INTERVAL
: Time for server pings. Defaults to 1200 ms.UPDATES_CHANNEL
: Telegram channel username without@
.FORCE_UPDATES_CHANNEL
: IfTrue
, users must join the update channel to use the bot.SESSION_NAME
: Database name. Defaults toHydroStreamerBot
.ALLOWED_USERS
: User Telegram IDs allowed to use the bot.KEEP_ALIVE
: IfTrue
, the server pings itself every few minutes.IMAGE_FILEID
: Photo to send with/myfiles
. Use file_id or an HTTP URL.TOS
: URL to your Terms of Service.MODE
: Set tosecondary
to use the server only for serving files.LINK_LIMIT
: Limit the number of links a user can generate.
BIN_CHANNEL
as admins.
/start
: To check if the bot is alive.- To get an instant stream link, just forward any media to the bot.
-
How long do the links remain valid?
Links remain valid as long as your bot is running and you haven't deleted the log channel.
Feel free to contribute to this project if you have any ideas!
- Original Code for migrating to HydroGram
- Fyaz Mohammed for commands, stream site, and optimizations
- SpringsFern for FileStreamBot
- eyaadh for some files