A File2Link Bot that can stores documents in private channel and instantly provide a accessible link
API_ID
: Telegram API_ID, get it from my.telegram.org/appsAPI_HASH
: Telegram API_ID, get it from my.telegram.org/appsBOT_TOKEN
: A valid bot token, get it from @BotFatherDB_CHANNEL
: Your Telegram channel's id Wwhere all th files are uploaded (Example: -1001246808642)SUDO_IDS
: Owner ids (Example: 1357907531 2468097531 3579864213)MONGO_DB
: A valid Mongo Db url to store useridsFORCE_SUB
: Your channel username to enable force subDELAY_TIME
: Delay time for bot sending filesHASH
: Random numbers for hashing the link (default: 6969)
To deploy on a VPS, follow these steps
- Update and upgrade your system packages:
sudo apt-get update && sudo apt-get upgrade -y
- Clone the repository and navigate to the project directory:
git clone https://github.com/maybebots/File2Link && cd File2Link
- Install the required packages:
pip3 install -U -r requirements.txt
- Create .env using example.env
cp example.env .env
- Now open the .env file using vi .env
- Edit the vars, by pressing I on the keyboard
- After editing save the file using ctrl + c then :wq
- Run the script using Python 3:
python3 bot.py
- Make sure to make the bot an admin in your Db channel.
- You can send your files/audio/text/etc directly to the bot's private message (PM). (This is only for sudo users) or by commands (/batch and /get)
- After the bot saves your file, it will provide you with a special link. When someone clicks on that link, the bot will send them the file you uploaded, as long as it hasn't been deleted.
- Additional Command
/broadcast [message]
or/broadcast (reply to a message
(only for sudo ids)