rajaganapathy2000 / Fclone-Bot2

Fclone Telegram Bot With updated Dependencies

Home Page:https://t.me/LotusCloudChat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fclone_Tg_Bot

โšซ This is just a Fclone only version of Telegram bot Modified and updated by Nemesis - Here

๐Ÿ”ท Fclone is just another Tool like Autorclone/Folderclone/Gclone to bypass 750GB limit by google (more optimised for speed)

๐Ÿ“— Pre-requisites:-

  1. Install Python 3.7+๏ผˆLatest version 3.8.3 recommended๏ผ‰
  2. You need Generated SAs (using Easiest method or Autorclone or Folderclone)
  3. Open accounts Folder (inside Autorclone or Folderclone Folder) and select any one of the json files and rename it as 1.json
  4. Zip the accounts Folder and keep it safe
  5. Make a new bot from Bot Father and get the Bot token
  6. Get your own Telegram ID - using this bot

๐Ÿ“™ Installation:-

  1. Download the Zip version of this repo or clone this repo using the command below
git clone https://github.com/LotusCloud/Fclone-Bot
  1. Unzip the Repository and Open CMD inside it (if u used git clone - Change directory to cloned repository)- and run this
pip install -r requirements.txt
  1. Open config.sample.ini (Its inside telegram_gcloner Folder) - Fill the appropriate values
[General]
path_to_gclone =./fclone

telegram_token = telegram bot token
user_ids = Your Telegram ID (multiple separated by commas, first ID is admin)
group_ids = Your Telegram Group ID (If you are not adding the bot to any group - you can leave it blank)

gclone_para_override = Leave it Blank
  1. After filling appropriate values - rename it as config.ini and save it

๐ŸŽ Running the Bot

๐Ÿ”ท Running in Windows 10/11 System - python telegram_gcloner.py

๐Ÿ”ท Running in Linux System - python3 telegram_gcloner.py

๐Ÿ”ถ How to use the bot:-

  1. Once its done - go to Telegram Bot you created before and Press Start
  2. Upload the accounts.zip (we created before) to the bot
  3. Reply to the message with /sa
  4. Type /folders and set your favourite Folders
  5. Send or forward a message with a Google Drive link to the bot to start Copying...

๐Ÿ“˜ How To make SA

Create credentials.JSON in Google Cloud Console

  • Open console.developers.google.com/apis/credentials (see in Video how to create it)

  • renamed to credentials.json the save to "Bot credentials" folder

ENABLE Required API

  • Go to console.cloud.google.com/apis/library

--- ENABLE Google Drive API

--- ENABLE Identity and Access Management (IAM) API

Create Token.Pickle + Token_sa.Pickle + Service Accounts JSON Files from Windows CMD

  • Open CMD in gdrive tools directory
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
pip -V (to confirm it's properly installed)

Generate Token.pickle

  • copy paste credentials.json from "Bot credentials" folder to mltb folder
pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib
python3 generate_drive_token.py
  • save token.pickle to "Bot credentials" folder

ALTERNATIVE COMMAND

in case python3 command not working / not installed properly in your windows system. you can use python only command without 3 at the end

example below :

python generate_drive_token.py

Generate Token_sa.pickle + SA Accounts folder

python -m pip install progress
python3 gen_sa_accounts.py --quick-setup 1 --new-only
  • save SAs (service accounts) folder and token_sa.pickle to "Bot credentials" folder

ALTERNATIVE COMMAND

in case python3 command not working / not installed properly in your windows system. you can use python only command without 3 at the end

example below :

python gen_sa_accounts.py --quick-setup 1 --new-only

Add Service Account to SHARED DRIVE / TEAM DRIVE

  • Open POWERSHELL in windows Accounts folder
  • Copy Paste this command
$emails = Get-ChildItem .\**.json |Get-Content -Raw |ConvertFrom-Json |Select -ExpandProperty client_email >>emails.txt
  • **For linux **
grep -oPh '"client_email": "\K[^"]+' *.json > emails.txt
  • Go to groups.google.com

  • create a new group (DON'T add SA in the 3rd step while creating group)

  • open your group, go to members tab and press 'Add Members'

  • Copy all mails from \accounts\emails.txt and paste in 'Group members' field, then press 'Add Members'

  • open your SHARED DRIVE and add this google group (it will be something like your@googlegroups.com) as 'Content Manager'. Done!

  • Don't forget delete emails.txt in your local drive

Alternative

  • add all the service accounts to your team drive by running this:
python3 add_to_team_drive.py -d YourSharedDriveID
  • If this does not work use
python add_to_team_drive.py -d YourSharedDriveID
  • You may check your team drive in order to see whether the service accounts are added or not. If it's added by 100 people, then it works. You can check the members too.

Credits:

๐Ÿง  Nemesis - Here - Updating Bot to latest dependencies and adding Custom docker image

๐Ÿง  wrenfairbank - Here - Original Author of the Bot

๐Ÿง  Seiko - Here - Made the English version

๐Ÿง  Smartass - Here - Added docker and Heroku support heroku support removed as it's against tos

License

This project is licensed under the MIT License - see the LICENSE file for details

About

Fclone Telegram Bot With updated Dependencies

https://t.me/LotusCloudChat

License:MIT License


Languages

Language:Python 99.6%Language:Dockerfile 0.3%Language:Shell 0.1%Language:HTML 0.0%