Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.
/ DDxD-Mirror-Bot Public archive

A Telegram mirror bot which can be deployed using Heroku,this bot can mirror almost any link & upload to G-drive.

License

Notifications You must be signed in to change notification settings

DebXD/DDxD-Mirror-Bot

Repository files navigation

Credits :

https://github.com/lzzy12/python-aria-mirror-bot

What are the key differences?

This bot is now can be deployed using a SmartPhone(mainly Termux) & Heroku.

  • Some UI improvement
  • Redefined Progress Bar
  • More Attractive enhanced look
  • More Stable

Features supported:

  • Mirroring direct download links to google drive
  • Download progress
  • Upload progress
  • Download/upload speeds and ETAs
  • Docker support
  • Uploading To Team Drives.
  • Index Link support
  • Service account support
  • Mirror telegram files
  • Mirror YouTube playlist,Videos

How to deploy?

Deploying is lengthy process required patience & here goes the steps :

  • Clone this repo in your device:
git clone https://github.com/DebiprasadXD/DDxD-Mirror-Bot 
cd DDxD-Mirror-Bot

Setting up config-sample file

  • BOT_TOKEN : The telegram bot token that you get from @BotFather
  • GDRIVE_FOLDER_ID : This is the folder ID of the Google Drive Folder/dir in which you want to upload all the mirrors.
  • TELEGRAPH_TOKEN : The token generated by running:
pip install telegraph
python3 generate_telegraph_token.py
pip install pyrogram
python3 generate_string_session.py

Leave other fields as it is.

Setting up config file by coping config-sample file to config file:

cp config_sample.env config.env

Getting Google OAuth API credential file

  • Visit the Google Cloud Console
  • Go to the OAuth Consent tab, fill it, and save.
  • Go to the Credentials tab and click Create Credentials -> OAuth Client ID
  • Choose Desktop and Create.
  • Use the download button to download your credentials.
  • Move that file to the root of mirror-bot, and rename it to credentials.json
  • Visit Google API page
  • Search for Drive and enable it if it is disabled
  • Finally, run the script to generate token file (token.pickle) for Google Drive:
pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib
python3 generate_drive_token.py

Deploying on Heroku using Termux:

  • Install Heroku cli
  • Login into your heroku account with command:
heroku login
  • Create a new heroku app:
heroku create <appname>
  • Select This App in your Heroku-cli:
heroku git:remote -a <appname>
  • Change Dyno Stack to a Docker Container:
heroku stack:set container
  • Add Heroku Postgres (only if you are deploying it for the 1st time)
heroku addons:create heroku-postgresql
  • Add Private Credentials and Config Stuff:
git add -f credentials.json token.pickle config.env heroku.yml
  • Commit new changes:
git commit -m "Added Creds."
  • Push Code to Heroku:
git push heroku master --force
  • Restart Worker by these commands,You can Do it manually too in heroku.
  • For Turning off the Bot:
heroku ps:scale worker=0
  • For Turning on the Bot:
heroku ps:scale worker=1	 	

Contact Me : DҽႦιρɾαʂαԃ

Packages

No packages published

Languages