Skip to content

Hello there, πŸ‘½ I am a Telegram Bot that can mirror files to your Google Drive.

Notifications You must be signed in to change notification settings

sachin0raon/Mirror2Gdrive

Repository files navigation

Mirror2GDrive

Hello there, πŸ‘½ I am a Telegram Bot that can download files using Aria2/Qbittorrent and upload them to your GDrive or Telegram. I can run only on Linux x86_64/amd64 system.

Available Commands

start         - πŸ‘½ Start the bot
mirror        - πŸ—³ Mirror file using Aria2
qbmirror      - 🧲 Mirror file using Qbittorrent
unzipmirror   - πŸ—ƒοΈ Mirror & unzip using Aria2
qbunzipmirror - 🫧 Mirror & unzip using Qbittorrent
leech         - 🧩 Mirror & leech using Aria2
qbleech       - πŸŒ€ Mirror and leech using Qbittorrent
unzipleech    - 🧬 Unzip and leech
task          - πŸ“₯ Show the task list
ngrok         - 🌍 Show Ngrok URL
stats         - βš™οΈ Show system info
log           - πŸ“„ Get runtime log file

Prepare config.env file

Create an env file in Github Gist or any other place but make sure to provide the direct download link of that file.

PICKLE_FILE_URL = ""
BOT_TOKEN = ""
TG_API_ID = ""
TG_API_HASH = ""
# To upload files in telegram
USER_SESSION_STRING = ""
# Authorized users to use the bot
USER_LIST = '[12345, 67890]'
# Drive/Folder ID to upload files
GDRIVE_FOLDER_ID = 'abcXYZ'
# For serving download directory with ngrok's built-in file server
NGROK_AUTH_TOKEN = ""
# For clearing tasks whose upload is completed
AUTO_DEL_TASK = False
# For downloading files from uptobox
UPTOBOX_TOKEN = ""
# For sending files to log channel
LOG_CHANNEL = ""
# For sending files to you
BOT_PM = True
# Create worker using https://gitlab.com/GoogleDriveIndex/Google-Drive-Index
# Example: https://index.workers.dev/0: (Add drive index num with : at the end)
INDEX_LINK = ""

Build and run the docker image

docker build -t mybot:latest .

docker run -d --name=Mirror2GdriveBot \
  -e CONFIG_FILE_URL="github gist link of config.env" \
  --restart=unless-stopped \
  -v $PWD:/usr/src/app `#optional: for data persistence` \
  -p 8010:8090 -p 8020:6800 `#optional: for accessing qbit/aria` \
  mybot:latest

Extras

  • To generate token.pickle file. First place the credentials.json file in current directory and run.
docker run --rm -it -v $PWD:/mnt --net host --entrypoint python mybot:latest generate_token_pickle.py
  • To get the user session string of your bot.
docker run --rm -it --entrypoint python mybot:latest session_generator.py

Credits

About

Hello there, πŸ‘½ I am a Telegram Bot that can mirror files to your Google Drive.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages