/File2Link

An easy file to link telegram bot

Primary LanguagePython

A File to Link Telegram Bot

A File2Link Bot that can stores documents in private channel and instantly provide a accessible link

made-with-python
Stars Forks Watchers
Repository Size Contributors Issues

Config Vars

  1. API_ID : Telegram API_ID, get it from my.telegram.org/apps
  2. API_HASH : Telegram API_ID, get it from my.telegram.org/apps
  3. BOT_TOKEN : A valid bot token, get it from @BotFather
  4. DB_CHANNEL : Your Telegram channel's id Wwhere all th files are uploaded (Example: -1001246808642)
  5. SUDO_IDS : Owner ids (Example: 1357907531 2468097531 3579864213)
  6. MONGO_DB : A valid Mongo Db url to store userids
  7. FORCE_SUB : Your channel username to enable force sub
  8. DELAY_TIME : Delay time for bot sending files
  9. HASH : Random numbers for hashing the link (default: 6969)

Deployment Methods

Vps

To deploy on a VPS, follow these steps

  1. Update and upgrade your system packages:
sudo apt-get update && sudo apt-get upgrade -y
  1. Clone the repository and navigate to the project directory:
git clone https://github.com/maybebots/File2Link && cd File2Link
  1. Install the required packages:
pip3 install -U -r requirements.txt
  1. Create .env using example.env
cp example.env .env
  1. Now open the .env file using vi .env
  2. Edit the vars, by pressing I on the keyboard
  3. After editing save the file using ctrl + c then :wq
  4. Run the script using Python 3:
python3 bot.py

How to Save Files?

  1. Make sure to make the bot an admin in your Db channel.
  2. 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)
  3. 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.
  4. Additional Command /broadcast [message] or /broadcast (reply to a message (only for sudo ids)

Still Having problem feel free to ask in our support group. We're here to help!

Support

Credits