GithubHelp home page GithubHelp logo

sam-max / rcmltb Goto Github PK

View Code? Open in Web Editor NEW
271.0 5.0 288.0 2.33 MB

An rclone telegram bot to mirror-leech and copy between many cloud servers

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

License: GNU General Public License v3.0

Dockerfile 0.03% Python 99.82% Shell 0.15%
aria2c mega mirror telegram-bot rclone python bot qbittorrent leech copy

rcmltb's Introduction

An Rclone Mirror-Leech Telegram Bot to transfer to and from many clouds. Based on mirror-leech-telegram-bot with rclone support added, and other features and changes from base code.

NOTE: Base repository added recently its own rclone implementation.

Features:

Rclone

  • Copy file/folder from cloud to cloud
  • Leech file/folder from cloud to Telegram
  • Mirror Link/Torrent/Magnets/Mega/Telegram-Files to cloud
  • Mirror from Telegram to multiple clouds at the same time
  • Telegram Navigation Button Menus to interact with cloud
  • File Manager: size, mkdir, delete, dedupe and rename
  • Service Accounts support with automatic switching
  • Create cloud index as http or webdav webserver
  • Sync between clouds (not folders)
  • Search files on cloud
  • Clean cloud trash
  • View cloud storage info

Others

  • Send rclone config file from bot
  • Renaming menu for Telegram files
  • Index support (rclone index for all remotes)
  • Search tmdb titles
  • Mirror and Leech files in batch from Telegram private/restricted channels
  • Mirror and Leech links in batch from .txt file
  • Extract and zip link/file from Telegram to cloud
  • Extract and zip folder/file from cloud to Telegram
  • Mirror to local host (no cloud upload)
  • Queue system for all Tasks.
  • Debrid Manager (only real debrid support)
  • Refactor of the whole code to use only pyrogram with asyncio
  • Docker based image based on ubuntu
  • Compatible with linux amd64, arm64/v8, arm/v7

Commands for bot(set through @BotFather)

mirror - or /m Mirror to selected cloud 
mirror_batch - or /mb Mirror Telegram files/links in batch to cloud
mirror_select - or /ms Select a fixed cloud/folder for mirror 
leech - or /l Leech from cloud/link to Telegram
leech_batch - or /lb Leech Telegram files/links in batch to Telegram 
ytdl - or /y Mirror ytdlp supported link
ytdl_leech - or /yl Leech yt-dlp supported link
files - or /bf Bot configuration files
debrid - Debrid Manager
rcfm - Rclone File Manager
copy - Copy from cloud to cloud
clone - Clone gdrive link file/folder 
count - count file/folder fom gdrive link
user_setting - User settings
own_setting - Owner settings
rss - Rss feed
tmdb - Search titles
cleanup - Clean cloud trash
cancel_all - Cancel all tasks
storage - Cloud details
serve - Serve cloud as web index 
sync - Sync two clouds
torrsch - Search for torrents
status - Status message of tasks
stats - Bot stats
shell - Run cmds in shell
log - Bot log
ip - show ip
ping - Ping bot
restart - Restart bot

How to deploy?

  1. Installing requirements
  • Clone repo:
git clone https://github.com/Sam-Max/rcmltb rcmltb/ && cd rcmltb
  • For Debian based distros
sudo apt install python3 python3-pip

Install Docker by following the official Docker docs

  • For Arch and it's derivatives:
sudo pacman -S docker python
  • Install dependencies for running setup scripts:
pip3 install -r requirements-cli.txt
  1. Set up config file
  • cp config_sample.env config.env

  • Fill up the fields on the config.env: NOTE: All values must be filled between quotes, even if it's Int, Bool or List.

1. Mandatory Fields

  • API_ID: get this from https://my.telegram.org. Int
  • API_HASH: get this from https://my.telegram.org. Str
  • BOT_TOKEN: The Telegram Bot Token (get from @BotFather). Str
  • OWNER_ID: your Telegram User ID (not username) of the owner of the bot. Int

2. Optional Fields

  • DOWNLOAD_DIR: The path to the local folder where the downloads will go. Str
  • SUDO_USERS: Fill user_id of users whom you want to give sudo permission separated by spaces. Str
  • ALLOWED_CHATS: list of IDs of allowed chats who can use this bot separated by spaces Str
  • AUTO_MIRROR: For auto mirroring files sent to the bot. NOTE: If you add bot to group(not channel), you can also use this feature. Default is False. Bool
  • DATABASE_URL: Your Mongo Database URL (Connection string). Data will be saved in Database (auth and sudo users, owner and user setting, etc). NOTE: You can always edit all settings saved in database from mongodb site -> (browse collections). Str
  • CMD_INDEX: index number that will be added at the end of all commands. Str
  • GD_INDEX_URL: Refer to https://gitlab.com/ParveenBhadooOfficial/Google-Drive-Index. Str
  • VIEW_LINK: View Link button to open file Google Drive Index Link in browser instead of direct download link, you can figure out if it's compatible with your Index code or not, open any video from you Index and check if its URL ends with ?a=view. Compatible with BhadooIndex Code. Default is False. Bool
  • STATUS_LIMIT: No. of tasks shown in status message with buttons.Int
  • LOCAL_MIRROR= set to True for enabling files to remain on host. Default to False.
  • TORRENT_TIMEOUT: Timeout of dead torrents downloading with qBittorrent
  • AUTO_DELETE_MESSAGE_DURATION: Interval of time (in seconds), after which the bot deletes it's message and command message. Set to -1 to disable auto message deletion. Int
  • TMDB_API_KEY: your tmdb API key. Click here
  • TMDB_LANGUAGE: tmdb search language. Default en.
  • PARALLEL_TASKS: Number of parallel tasks for queue system. Int

Update

  • UPSTREAM_REPO: Your github repository link. If your repo is private, add your github repo link with format: https://username:{githubtoken}@github.com/{username}/{reponame}: get token from Github settings. Str. With this field you can update your bot from public/private repository on each restart.
  • UPSTREAM_BRANCH: Upstream branch for update. Default is master. Str NOTE: If any change in docker or requirements you will need to deploy/build again with updated repo for changes to apply. DON'T delete .gitignore file.

Rclone

  • DEFAULT_OWNER_REMOTE: to set default remote from your rclone config for mirroring. (only for owner). Str
  • DEFAULT_GLOBAL_REMOTE: to set default remote from global rclone config for mirroring. Use this when MULTI_RCLONE_CONFIG is False. Str
  • MULTI_RCLONE_CONFIG: set to True for allowing each user to use their own rclone config. Default to False. Bool
  • REMOTE_SELECTION: set to True to activate selection of cloud server each time using mirror command. Default to False. Bool
  • MULTI_REMOTE_UP= set to True for allowing upload to multiple clouds servers at the same time. Bool. (only for owner)
  • USE_SERVICE_ACCOUNTS: set to True for enabling SA for rclone copy. Default to False. Bool.
  • SERVICE_ACCOUNTS_REMOTE= name of the shared drive remote from your rclone config file. Str. Note: remote must have team_drive field with id in order to work. Str
  • SERVER_SIDE= set to True for enabling rclone server side copy. Default to False. NOTE: if you get errors while copy set this to False. Bool
  • RCLONE_COPY_FLAGS = key:value,key. All Flags: RcloneFlags.Str
  • RCLONE_UPLOAD_FLAGS = key:value,key. Str
  • RCLONE_DOWNLOAD_FLAGS = key:value,key.Str
  • RC_INDEX_URL: Public IP/domain where bot is running. Format of URL must be: http://myip, where myip is the Public IP/Domain. Str
  • RC_INDEX_PORT: Port to use. Default to 8080. Str
  • RC_INDEX_USER: Custom user. Default to admin. Str
  • RC_INDEX_PASS: Custom password. Default to admin. Str

GDrive Tools

  • GDRIVE_FOLDER_ID: Folder/TeamDrive ID of the Google Drive Folder or root to which you want to clone. Required for Google Drive. Int
  • IS_TEAM_DRIVE: Set True if TeamDrive. Default is False. Bool
  • EXTENSION_FILTER: File extensions that won't clone. Separate them by space. Str Notes: Must add token.pickle file directly to root for cloning to work. You can use /files command to add from bot.

Leech

  • LEECH_SPLIT_SIZE: Telegram upload limit in bytes, to automatically slice the file bigger that this size into small parts to upload to Telegram. Default is 2GB for non premium account or 4GB if your account is premium. Int
  • EQUAL_SPLITS: Split files larger than LEECH_SPLIT_SIZE into equal parts size (not working with zip cmd). Default is False. Bool
  • USER_SESSION_STRING: Pyrogram session string for batch commands and for telegram premium upload. To generate string session use this command python3 session_generator.py on command line on your pc from repository folder. NOTE: When using string session, you have to use with LEECH_LOG. You can also use batch commands without string session, but you can't save messages from private/restricted telegram channels. Str
  • LEECH_LOG: Chat ID. Upload files to specific chat/chats. Add chats separated by spaces. Str NOTE: Only available for superGroup/channel. Add -100 before channel/supergroup id. Add bot in that channel/group as admin if using without string session.
  • BOT_PM: set to True if you want to send leeched files in user's PM. Default to False. Bool

MEGA

  • MEGA_EMAIL: E-Mail used to sign up on mega.nz for using premium account.Str
  • MEGA_PASSWORD: Password for mega.nz account.Str

RSS

  • RSS_DELAY: Time in seconds for rss refresh interval. Default is 900 in sec. Int
  • RSS_CHAT_ID: Chat ID where rss links will be sent. If you want message to be sent to the channel then add channel id. Add -100 before channel id. Int
  • RSS NOTE: RSS_CHAT_ID is required, otherwise monitor will not work. You must use USER_STRING_SESSION --OR-- CHANNEL. If using channel then bot should be added in both channel and group(linked to channel) and RSS_CHAT_ID is the channel id, so messages sent by the bot to channel will be forwarded to group. Otherwise with USER_STRING_SESSION add group id for RSS_CHAT_ID. If DATABASE_URL not added you will miss the feeds while bot offline.

qBittorrent/Aria2c

  • QB_BASE_URL: Valid BASE URL where the bot is deployed to use qbittorrent web selection and local mirror. Format of URL should be http://myip, where myip is the Public IP/Domain. If you have chosen port other than 80, write it in this format http://myip:port (http and not https).Str
  • QB_SERVER_PORT: Port. Default to 80. Int
  • WEB_PINCODE: If empty or False means no pincode required while torrent file web selection. Bool Qbittorrent NOTE: If your facing ram exceeded issue then set limit for MaxConnecs, decrease AsyncIOThreadsCount in qbittorrent config and set limit of DiskWriteCacheSize to 32.Int

Torrent Search

  • SEARCH_API_LINK: Search api app link. Get your api from deploying this repository. Str
  • SEARCH_LIMIT: Search limit for search api, limit for each site. Default is zero. Int
  • SEARCH_PLUGINS: List of qBittorrent search plugins (github raw links). Add/Delete plugins as you wish. Main Source: qBittorrent Search Plugins (Official/Unofficial).List
  1. Deploying with Docker
  • Build Docker image:
sudo docker build . -t rcmltb 
  • Run the image:
sudo docker run -p 80:80 -p 8080:8080 rcmltb
  • To stop the container:
  sudo docker ps
  sudo docker stop id
  • To clear the container:
  sudo docker container prune
  • To delete the images:
  sudo docker image prune -a
  1. Deploying using docker-compose

NOTE: If you want to use port other than 80 (torrent file selection) or 8080 (rclone serve), change it in docker-compose.yml

  • Install docker-compose
sudo apt install docker-compose
  • Build and run Docker image:
sudo docker-compose up
  • After editing files with nano for example (nano start.sh):
sudo docker-compose up --build
  • To stop the image:
sudo docker-compose stop
  • To run the image:
sudo docker-compose start

Generate Database

  1. Go to https://mongodb.com/ and sign-up.
  2. Create Shared Cluster (Free).
  3. Add username and password for your db and click on Add my current IP Address.
  4. Click on Connect, and then press on Connect your application.
  5. Choose Driver python and version 3.6 or later.
  6. Copy your connection string and replace <password> with the password of your user, then press close.
  7. Go to Network Access tab, click on edit button and finally click Allow access from anywhere and confirm.

How to create rclone config file

Check this youtube video (not mine, credits to author):

Notes:

  • When you create rclone.conf file add at least two accounts if you want to copy from cloud to cloud.
  • For those on android phone, you can use RCX app app to create rclone.conf file. Use "Export rclone config" option in app menu to get config file.
  • Rclone supported providers:

    1Fichier, Amazon Drive, Amazon S3, Backblaze B2, Box, Ceph, DigitalOcean Spaces, Dreamhost, Dropbox, Enterprise File Fabric, FTP, GetSky, Google Cloud Storage, Google Drive, Google Photos, HDFS, HTTP, Hubic, IBM COS S3, Koofr, Mail.ru Cloud, Mega, Microsoft Azure Blob Storage, Microsoft OneDrive, Nextcloud, OVH, OpenDrive, Oracle Cloud Storage, ownCloud, pCloud, premiumize.me, put.io, Scaleway, Seafile, SFTP, WebDAV, Yandex Disk, etc. Check all providers on official site: Click here.

Getting Google OAuth API credential file and token.pickle

NOTES

  • You need OS with a browser.
  • Windows users should install python3 and pip. You can find how to install and use them from google.
  • You can ONLY open the generated link from generate_drive_token.py in local browser.
  1. Visit the Google Cloud Console
  2. Go to the OAuth Consent tab, fill it, and save.
  3. Go to the Credentials tab and click Create Credentials -> OAuth Client ID
  4. Choose Desktop and Create.
  5. Publish your OAuth consent screen App to prevent token.pickle from expire
  6. Use the download button to download your credentials.
  7. Move that file to the root of rclone-tg-bot, and rename it to credentials.json
  8. Visit Google API page
  9. Search for Google Drive Api and enable it
  10. Finally, run the script to generate token.pickle file for Google Drive:
pip3 install google-api-python-client google-auth-httplib2 google-auth-oauthlib
python3 generate_drive_token.py

Bittorrent Seed

  • Using -d argument alone will lead to use global options for aria2c or qbittorrent.

Qbittorrent

  • Global options: GlobalMaxRatio and GlobalMaxSeedingMinutes in qbittorrent.conf, -1 means no limit, but you can cancel manually.
    • NOTE: Don't change MaxRatioAction.

Using Service Accounts to avoid user rate limit [For Google Drive Remotes]

For Service Account to work, you must set USE_SERVICE_ACCOUNTS= "True" in config file or environment variables. NOTE: Using Service Accounts is only recommended for Team Drive.

1. Generate Service Accounts. What is Service Account?

Warning: Abuse of this feature is not the aim of this project and we do NOT recommend that you make a lot of projects, just one project and 100 SAs allow you plenty of use, its also possible that over abuse might get your projects banned by Google.

NOTE: If you have created SAs in past from this script, you can also just re download the keys by running:

python3 gen_sa_accounts.py --download-keys $PROJECTID

NOTE: 1 Service Account can copy around 750 GB a day, 1 project can make 100 Service Accounts so you can copy 75 TB a day.

Two methods to create service accounts

Choose one of these methods

1. Create Service Accounts in existed Project (Recommended Method)
  • List your projects ids
python3 gen_sa_accounts.py --list-projects
  • Enable services automatically by this command
python3 gen_sa_accounts.py --enable-services $PROJECTID
  • Create Sevice Accounts to current project
python3 gen_sa_accounts.py --create-sas $PROJECTID
  • Download Sevice Accounts as accounts folder
python3 gen_sa_accounts.py --download-keys $PROJECTID
2. Create Service Accounts in New Project
python3 gen_sa_accounts.py --quick-setup 1 --new-only

A folder named accounts will be created which will contain keys for the Service Accounts.

2. Add Service Accounts

Two methods to add service accounts

Choose one of these methods

1. Add Them To Google Group then to Team Drive (Recommended)
  • Mount accounts folder
cd accounts
  • Grab emails form all accounts to emails.txt file that would be created in accounts folder
  • For Windows using PowerShell
$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
  • Unmount acounts folder
cd ..

Then add emails from emails.txt to Google Group, after that add this Google Group to your Shared Drive and promote it to manager and delete email.txt file from accounts folder

2. Add Them To Team Drive Directly
  • Run:
python3 add_to_team_drive.py -d SharedTeamDriveSrcID

Yt-dlp and Aria2c Authentication Using .netrc File

For using your premium accounts in yt-dlp or for protected Index Links, create .netrc and not netrc, this file will be hidden, so view hidden files to edit it after creation. Use following format on file:

Format:

machine host login username password my_password

Example:

machine instagram login user.name password mypassword

Instagram Note: You must login even if you want to download public posts and after first try you must confirm that this was you logged in from different ip(you can confirm from phone app).

Youtube Note: For youtube authentication use cookies.txt file.

Using Aria2c you can also use built in feature from bot with or without username. Here example for index link without username.

machine example.workers.dev password index_password

Where host is the name of extractor (eg. instagram, Twitch). Multiple accounts of different hosts can be added each separated by a new line.


Donations

ko-fi


Bot Screenshot:

button menu example


rcmltb's People

Contributors

imgbotapp avatar khainee avatar n-sudy avatar sam-max avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rcmltb's Issues

Qbit Error

When try to use qb commands on a torrent I get this error.
022-08-05 13:39:11,209 ERROR MainThread pyrogram.dispatcher 'builtin_function_or_method' object has no attribute 'time'
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/pyrogram/dispatcher.py", line 240, in handler_worker
await handler.callback(self.client, *args)
File "/usr/src/app/bot/core/handlers/handle_mirror_cm.py", line 29, in handle_qbit_mirror_command
await mirror(client, message, isQbit=True)
File "/usr/src/app/bot/core/handlers/handle_mirror_cm.py", line 114, in mirror
state, message, path, name = await qbit_dl.add_qb_torrent(link)
File "/usr/src/app/bot/downloaders/qbit/qbit_downloader.py", line 39, in add_qb_torrent
time_s= str(time.time()).replace(".","")
AttributeError: 'builtin_function_or_method' object has no attribute 'time'

/leech command problem

I use the /LEECH command to copy a 1.7GMP4 file from the cloud to telegram, the robot does not pop up the video file, is it because the file is too large? Or MP4 format is not supported? I use the same method/leech a 64MB .7z archive and the robot can eject files normally.
image

Bug: Telegram uploading is not working properly.

There is a problem uploading zip file to telegram.

When I leech zip file of upload max size it creates a new zip file of the existing zip file. I am uploading a zip file of 6GB on telegram it should be spilt as file.zip.001 file.zip.002 file.zip.003 but bot uploads it as file.zip.zip.001 file.zip.zip.002 file.zip.zip.003

Please resolve this issue and @Sam-Max thanking you for making this wonderful Rclone bot.

tag error

When using /qbmirror to download a magnetic or torrent file, it will not be automatically uploaded to the cloud after the download is complete. I found that it should be the tag problem in the newly added qb configuration file.

2022-09-02 07:35:13,166 INFO MainThread bot QbitDownload started: 88888axa432554qw864348243 - Hash: 88888axa432554qw864348243 2022-09-02 07:36:58,137 INFO MainThread bot dict_values([<bot.utils.status_utils.qbit_status.qBitTorrentStatus object at 0xfff812243880>]) 2022-09-02 07:36:58,137 INFO MainThread bot Cancelling Download: 88888axa432554qw864348243, cause: Download stopped by user!! 2022-09-02 07:37:07,582 INFO MainThread bot QbitDownload started: 88888axa432554qw864348243 - Hash: 88888axa432554qw864348243 2022-09-02 07:38:29,617 ERROR MainThread pyrogram.dispatcher local variable 'tag' referenced before assignment Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/pyrogram/dispatcher.py", line 240, in handler_worker await handler.callback(self.client, *args) File "/usr/src/app/bot/core/handlers/handle_mirror.py", line 30, in handle_qbit_mirror_command await mirror(client, message, isQbit=True) File "/usr/src/app/bot/core/handlers/handle_mirror.py", line 140, in mirror rclone_mirror = RcloneMirror(path, rmsg, tag) UnboundLocalError: local variable 'tag' referenced before assignment 2022-09-02 07:39:49,199 INFO MainThread telethon.client.uploads Uploading file of 9263 bytes in 1 chunks of 131072

2022-09-02_15-43-39

"Send an Rclone config file" Issue At Supergroup

Bot is awesome but when I add it to my supergroup, It replies every message with "Send an Rclone config file". Even I send config file. I can't use it on supergroup.

Screenshot: https://prnt.sc/AsHOIbRfXE8g
Note: Bot is admin but saying "This message doesn't contain any downloadable media" to my config file.

Sorry for my bad English.

2022-09-11 08:40:57,601 ERROR MainThread pyrogram.dispatcher Telegram says: [406 CHANNEL_PRIVATE] - The channel/supergroup is not accessible (caused by "messages.SendMessage") Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/pyrogram/dispatcher.py", line 240, in handler_worker await handler.callback(self.client, *args) File "/usr/src/app/bot/modules/config.py", line 19, in handle_config question= await client.send_message(message.chat.id, File "/usr/local/lib/python3.10/dist-packages/pyrogram/methods/messages/send_message.py", line 124, in send_message r = await self.invoke( File "/usr/local/lib/python3.10/dist-packages/pyrogram/methods/advanced/invoke.py", line 77, in invoke r = await self.session.invoke( File "/usr/local/lib/python3.10/dist-packages/pyrogram/session/session.py", line 361, in invoke return await self.send(query, timeout=timeout) File "/usr/local/lib/python3.10/dist-packages/pyrogram/session/session.py", line 331, in send RPCError.raise_it(result, type(data)) File "/usr/local/lib/python3.10/dist-packages/pyrogram/errors/rpc_error.py", line 91, in raise_it raise getattr( pyrogram.errors.exceptions.not_acceptable_406.ChannelPrivate: Telegram says: [406 CHANNEL_PRIVATE] - The channel/supergroup is not accessible (caused by "messages.SendMessage") 2022-09-11 08:40:58,004 INFO MainThread telethon.client.updates Timeout waiting for updates expired 2022-09-11 08:40:58,005 INFO MainThread telethon.client.updates Getting difference for account updates 2022-09-11 08:40:58,047 INFO MainThread telethon.client.updates Getting difference for channel updates 2022-09-11 08:40:58,068 INFO MainThread telethon.client.updates Account is now banned in "I hidden my channel ID" so we can no longer fetch updates from it 2022-09-11 08:43:33,008 INFO MainThread pyrogram.session.session NetworkTask stopped 2022-09-11 08:43:33,009 INFO MainThread pyrogram.session.session PingTask stopped 2022-09-11 08:43:33,009 INFO MainThread pyrogram.connection.connection Disconnected 2022-09-11 08:43:33,010 INFO MainThread pyrogram.session.session Session stopped 2022-09-11 08:43:33,010 INFO MainThread pyrogram.connection.connection Connecting... 2022-09-11 08:43:33,010 INFO MainThread pyrogram.session.session [1] Retrying "messages.DeleteMessages" due to TimeoutError() 2022-09-11 08:43:33,012 INFO MainThread pyrogram.connection.connection Connected! Production DC4 - IPv4 - TCPAbridgedO 2022-09-11 08:43:33,013 INFO MainThread pyrogram.session.session NetworkTask started 2022-09-11 08:43:33,109 INFO MainThread pyrogram.session.session Session initialized: Layer 145 2022-09-11 08:43:33,110 INFO MainThread pyrogram.session.session Device: CPython 3.10.4 - Pyrogram 2.0.51 2022-09-11 08:43:33,110 INFO MainThread pyrogram.session.session System: Linux 5.15.0-1017-oracle (EN) 2022-09-11 08:43:33,110 INFO MainThread pyrogram.session.session Session started 2022-09-11 08:43:33,110 INFO MainThread pyrogram.session.session PingTask started 2022-09-11 08:48:06,795 INFO MainThread telethon.client.updates Timeout waiting for updates expired 2022-09-11 08:48:06,796 INFO MainThread telethon.client.updates Getting difference for account updates 2022-09-11 08:48:21,691 INFO MainThread telethon.client.updates Timeout waiting for updates expired 2022-09-11 08:48:21,691 INFO MainThread telethon.client.updates Getting difference for channel updates 2022-09-11 08:48:25,437 INFO MainThread telethon.client.updates Timeout waiting for updates expired 2022-09-11 08:48:25,437 INFO MainThread telethon.client.updates Getting difference for channel updates 2022-09-11 08:48:41,588 INFO MainThread telethon.client.updates Timeout waiting for updates expired 2022-09-11 08:48:41,588 INFO MainThread telethon.client.updates Getting difference for channel updates 2022-09-11 08:49:19,128 INFO MainThread telethon.client.updates Timeout waiting for updates expired 2022-09-11 08:49:19,129 INFO MainThread telethon.client.updates Getting difference for account updates 2022-09-11 08:49:23,742 INFO MainThread pyrogram.connection.connection Connecting... 2022-09-11 08:49:23,744 INFO MainThread pyrogram.connection.connection Connected! Production DC4 (media) - IPv4 - TCPAbridgedO 2022-09-11 08:49:23,745 INFO MainThread pyrogram.session.session NetworkTask started 2022-09-11 08:49:23,812 INFO MainThread pyrogram.session.session Session initialized: Layer 145 2022-09-11 08:49:23,812 INFO MainThread pyrogram.session.session Device: CPython 3.10.4 - Pyrogram 2.0.51 2022-09-11 08:49:23,812 INFO MainThread pyrogram.session.session System: Linux 5.15.0-1017-oracle (EN) 2022-09-11 08:49:23,812 INFO MainThread pyrogram.session.session Session started 2022-09-11 08:49:23,812 INFO MainThread pyrogram.session.session PingTask started 2022-09-11 08:49:23,827 WARNING MainThread pyrogram.parser.html Unclosed tags: <code> (x1)

Upload issue

I am trying to upload a zip file to my onedrive using an index link.The file downloads successfully.But when uploading the upload happena partially.Upload progress go about 5% then suddenly shows upload complete message.The file is also in my onedrive and it shows the full file size.But when I download the file and try extract it says corrupted zip file.

Unable to load Rclone

Hey i successfully deployed the master branch, but i am unable to add rclone configs in it.
Also, do i need to keep the first line of rclone.conf file.

My rclone.conf file looks like this.

[Onedrive]
type = onedrive
client_id = xyz
client_secret = 12345
token = {"access_token":"123xyz"}
drive_id = b!AWkpb6haR0OuWlRa2
drive_type = business

and my variable RCLONE_CONFIG looks like

RCLONE_CONFIG = "[Onedrive]
type = onedrive
client_id = xyz
client_secret = 12345
token = {"access_token":"123xyz"}
drive_id = b!AWkpb6haR0OuWlRa2
drive_type = business
"

the format is right?

i was using the above format but the app threw some error, i have attached the error logs below.
https://gist.github.com/hackevil/a48564cde157f8901458003bf5a20857

status bug

I don't know if this is a bug. It has appeared twice, and the status has not been updated, causing the file to be copied from the cloud to the cloud to be interrupted.If you copy large-capacity files, if this problem occurs, it is very painful, because you have to start from scratch and cannot continue
image
image

leech error

Mirroring MKV video files from the cloud to telegram does not display the video content, only displays the title
I am a telegram member, and I set TG_SPLIT_SIZE= "4294967296" in the config configuration file
image

Showing config menu

Whenever I send a link or a telegram file ownerset command executes automatically.

Mega Link Error

I am using a free mega account. When I try to zipmirror or mirror a mega link I get this error.
2022-09-05 02:12:28,128 INFO MainThread telethon.client.uploads Uploading file of 4884 bytes in 1 chunks of 131072
2022-09-05 02:12:29,010 ERROR MainThread pyrogram.dispatcher {'dlinfo': 'failed', 'message': 'no such gid currently exists in downloader'}
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/pyrogram/dispatcher.py", line 240, in handler_worker
await handler.callback(self.client, *args)
File "/usr/src/app/bot/modules/mirror.py", line 35, in handle_zip_mirror
await mirror_leech(client, message, isZip=True)
File "/usr/src/app/bot/modules/mirror.py", line 151, in mirror_leech
state, rmsg, path= await mega_dl.execute(path= f'{DOWNLOAD_DIR}{message.id}')
File "/usr/src/app/bot/downloaders/mega/mega_download.py", line 40, in execute
status, rmsg, path= await mega_status.create_status()
File "/usr/src/app/bot/utils/status_utils/mega_status.py", line 31, in create_status
self._dl_info = await self._obj.loop.run_in_executor(None, partial(self._obj.mega_client.getDownloadInfo, self.__gid))
File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.10/dist-packages/megasdkrestclient/client.py", line 33, in getDownloadInfo
return checkAndRaise(res, 'dlinfo')
File "/usr/local/lib/python3.10/dist-packages/megasdkrestclient/utils.py", line 9, in checkAndRaise
raise MegaSdkRestClientException(obj)
megasdkrestclient.errors.MegaSdkRestClientException: {'dlinfo': 'failed', 'message': 'no such gid currently exists in downloader'}

folders from second page in copy menu

Hi, I have several folders and when trying to /copy a folder from second page it will not open.. folders listed in first page open and I can copy those, however, folders that appear in page 2 onwards do not open.

I have deployed different versions of repo (anasty-like repo) and the issue remains.
I have an older version of the repo (before anasty-like) and there I can copy whatever folder from any page in the copy menu..

So there might be something wrong in the newest code.. sadly I don't have any logs to show but I suspect it doesn't show in the logs either.
Edit: I just checked latest commit and saw you fixed something in copy module.. so I guess that's the solution.. will deploy and verify.
Edit2: Still same issue..
Thanks for your work!

Command issue

Whenever I try to use mirror and other commands I get this error.All variables are filled correctly.
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/pyrogram/dispatcher.py", line 240, in handler_worker
await handler.callback(self.client, *args)
File "/usr/src/app/bot/core/handlers/handle_mirror_cm.py", line 20, in handle_mirror_command
await mirror(client, message)
File "/usr/src/app/bot/core/handlers/handle_mirror_cm.py", line 34, in mirror
if user_id in get_val("ALLOWED_USERS") or chat_id in get_val("ALLOWED_CHATS") or user_id == get_val("OWNER_ID"):
File "/usr/src/app/bot/core/get_vars.py", line 6, in get_val
return SessionVars.get_var(variable)
File "/usr/src/app/bot/core/var_holder.py", line 50, in get_var
ausers_second.append(int(user))
ValueError: invalid literal for int() with base 10: ''
2022-08-07 15:39:57,110 ERROR MainThread pyrogram.dispatcher invalid literal for int() with base 10: ''
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/pyrogram/dispatcher.py", line 240, in handler_worker
await handler.callback(self.client, *args)
File "/usr/src/app/bot/core/handlers/handle_mirror_cm.py", line 20, in handle_mirror_command
await mirror(client, message)
File "/usr/src/app/bot/core/handlers/handle_mirror_cm.py", line 34, in mirror
if user_id in get_val("ALLOWED_USERS") or chat_id in get_val("ALLOWED_CHATS") or user_id == get_val("OWNER_ID"):
File "/usr/src/app/bot/core/get_vars.py", line 6, in get_val
return SessionVars.get_var(variable)
File "/usr/src/app/bot/core/var_holder.py", line 50, in get_var
ausers_second.append(int(user))
ValueError: invalid literal for int() with base 10: ''
2022-08-07 15:39:58,564 ERROR MainThread pyrogram.dispatcher invalid literal for int() with base 10: ''
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/pyrogram/dispatcher.py", line 240, in handler_worker
await handler.callback(self.client, *args)
File "/usr/src/app/bot/core/handlers/handle_mirror_cm.py", line 20, in handle_mirror_command
await mirror(client, message)
File "/usr/src/app/bot/core/handlers/handle_mirror_cm.py", line 34, in mirror
if user_id in get_val("ALLOWED_USERS") or chat_id in get_val("ALLOWED_CHATS") or user_id == get_val("OWNER_ID"):
File "/usr/src/app/bot/core/get_vars.py", line 6, in get_val
return SessionVars.get_var(variable)
File "/usr/src/app/bot/core/var_holder.py", line 50, in get_var
ausers_second.append(int(user))
ValueError: invalid literal for int() with base 10: ''
2022-08-07 15:39:59,267 ERROR MainThread pyrogram.dispatcher invalid literal for int() with base 10: ''
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/pyrogram/dispatcher.py", line 240, in handler_worker
await handler.callback(self.client, *args)
File "/usr/src/app/bot/core/handlers/handle_mirror_cm.py", line 20, in handle_mirror_command
await mirror(client, message)
File "/usr/src/app/bot/core/handlers/handle_mirror_cm.py", line 34, in mirror
if user_id in get_val("ALLOWED_USERS") or chat_id in get_val("ALLOWED_CHATS") or user_id == get_val("OWNER_ID"):
File "/usr/src/app/bot/core/get_vars.py", line 6, in get_val
return SessionVars.get_var(variable)
File "/usr/src/app/bot/core/var_holder.py", line 50, in get_var
ausers_second.append(int(user))
ValueError: invalid literal for int() with base 10: ''
2022-08-07 15:40:00,301 ERROR MainThread pyrogram.dispatcher invalid literal for int() with base 10: ''
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/pyrogram/dispatcher.py", line 240, in handler_worker
await handler.callback(self.client, *args)
File "/usr/src/app/bot/core/handlers/handle_mirror_cm.py", line 20, in handle_mirror_command
await mirror(client, message)
File "/usr/src/app/bot/core/handlers/handle_mirror_cm.py", line 34, in mirror
if user_id in get_val("ALLOWED_USERS") or chat_id in get_val("ALLOWED_CHATS") or user_id == get_val("OWNER_ID"):
File "/usr/src/app/bot/core/get_vars.py", line 6, in get_val
return SessionVars.get_var(variable)
File "/usr/src/app/bot/core/var_holder.py", line 50, in get_var
ausers_second.append(int(user))
ValueError: invalid literal for int() with base 10: ''

.

No need

Bot randomly restarts mid download

I was leeching a 100gb file with not a lot of seeders, and out of nowhere I see the uptime message from the bot, and the download stops moving. I assume this isn't a code issue, rather a heroku issue. Does anyone know about this issue and possibly how to circumvent it? Only real issue I have with the bit itself is that each download has its own message, which with many concurrent downloads can be a bit of a chore to keep track of. Otherwise, great bot, keep up the great work!

Unzipleech

Used the unzipleech command.File get downloaded successfully.But file doesn't get unzipped.!

mirror error

/mirror download torrent stuck at 99.97%.
/mirror After calling aria2 to download the file and uploading it to the cloud, the aria2 file will also be uploaded.
image
image

task status stuck bug

I'm back again, when the task is uploading rclone, it has actually been uploaded, but the task status is still displayed in the upload, it seems to be stuck, this may be a bug.
image

Using As Second Bot Port Issue

I'm trying this bot as second bot in one VDS. I changed the port to "81" at my config.env But I get an error message when build the docker.

Successfully tagged rclone-tg-bot_app:latest WARNING: Image for service app was built because it did not already exist. To rebuild this image you must use docker-compose buildordocker-compose
up --build. Creating rclone-tg-bot_app_1 ... Creating rclone-tg-bot_app_1 ... error ERROR: for rclone-tg-bot_app_1 Cannot start service app: driver failed programming external connectivity on endpoint rclone-tg-bot_app_1 (52e45d8e1f5f2c0ce97ad59568a01e3ac467599bae02dcaef538e26119edfe19): Bind for 0.0.0.0:80 failed: port is already allocated ERROR: for app Cannot start service app: driver failed programming external connectivity on endpoint rclone-tg-bot_app_1 (52e45d8e1f5f2c0ce97ad59568a01e3ac467599bae02dcaef538e26119edfe19): Bind for 0.0.0.0:80 failed: port is already allocated ERROR: Encountered errors while bringing up the project.

Status message error

After files uploaded successfully to the onedrive the status message is showing
Screenshot_20221001-175832_Plus

Few Missing Features.

1.Shareable files and folders link.

  • When /myfiles is used, it list files and when a file is selected it only shows its name & delete option, it would be nice to have link along with it and also give a delete option for folder too, it will be very tiring process to delete each files individually.

  • Message containing link of file/folder when leeching/mirroring is completed.

image

2. Status Command

  • A status command is must, coz when bunch of friend use bot it is very hard to find msg of leech/mirror files, we have to scroll a lot to find the exact msg
  • A better option would be to ha an auto updating status message for all running tasks, which should be updated at certain interval and then it would msg new status after the interval while deleting the old status of all tasks.

3. A better Upload status message.

  • Its very vanilla and does not match with the download status format, it should be like the download status message, same stands for /leech command status.

image

Few tweaks for /leech command

  • When /leech command is used, the telegram files are uploaded and presented as it is, and if there is large no of files in a folder and is leeched it uploads a lot of files and sends it, which is a mess to manage and looks very cluttered, so i thing there should be and option for "/leechzip and /leechunzip", which would declutter the chat a lot and '/leechunzip' would be nice to have if you we need to upload the contents of and zipped file, unzipped to telegram.
  • Lets say if folder has lots of files in it, and when /leech command is used on it it uploads tons of files and send it to the chat. Now we have lots of files in our chat, now it will be again a lot of hassle for the user to manage/find the file if he need to find it few days later. So i think the bot should send a message containing all list of files name with hyperlink to the files in a single message. so that the user can save the on message containing all the links instead of remembering/scrolling to the 100s of files he leeched to telegram. I have attached the 2nd screenshot below for reference.
    image
    image

4.File selection for /qbmirror

  • Add file selection for qbittoreent.

I may add more suggestion later, right now i can only think of these.

Also make an telegram group for more discussion about features and their implementation.

Bug Report with logs and ss attached

My config

image
Should I keep port number 80 or keep it blank

  1. Qbit download not working
    image
  • its stuck here
  1. Copy menu does not close

image

  • app_1 | 2022-09-07 11:53:48,006 ERROR MainThread pyrogram.dispatcher 'CallbackQuery' object has no attribute 'delete' app_1 | Traceback (most recent call last): app_1 | File "/usr/local/lib/python3.10/dist-packages/pyrogram/dispatcher.py", line 240, in handler_worker app_1 | await handler.callback(self.client, *args) app_1 | File "/usr/src/app/bot/modules/copy.py", line 229, in copy_menu_settings app_1 | await query.delete() app_1 | AttributeError: 'CallbackQuery' object has no attribute 'delete'

Error when leeching

2022-06-28T07:03:34.093876+00:00 app[worker.1]: Traceback (most recent call last):
2022-06-28T07:03:34.093876+00:00 app[worker.1]: File "/usr/local/lib/python3.10/dist-packages/pyrogram/dispatcher.py", line 240, in handler_worker
2022-06-28T07:03:34.093877+00:00 app[worker.1]: await handler.callback(self.client, *args)
2022-06-28T07:03:34.093877+00:00 app[worker.1]: File "/usr/src/app/bot/core/menus/callbacks/handle_leech_menu_cb.py", line 65, in handle_setting_leech_menu_callback
2022-06-28T07:03:34.093878+00:00 app[worker.1]: await rclone_leech.leech()
2022-06-28T07:03:34.093878+00:00 app[worker.1]: File "/usr/src/app/bot/uploaders/rclone/rclone_leech.py", line 71, in leech
2022-06-28T07:03:34.093879+00:00 app[worker.1]: rcres= await self.__rclone_update()
2022-06-28T07:03:34.093879+00:00 app[worker.1]: File "/usr/src/app/bot/uploaders/rclone/rclone_leech.py", line 174, in __rclone_update
2022-06-28T07:03:34.093880+00:00 app[worker.1]: if time.time() - start > edit_time:
2022-06-28T07:03:34.093880+00:00 app[worker.1]: TypeError: '>' not supported between instances of 'float' and 'NoneType'

This happens after we send leech command and select file/folder to be leeched. Nothing gets uploaded and bot shows this error.

Also i do hope you are alright and recovering after surgery greatly as i saw previous issue comment.

Upload error

After new commit bot upload not working.I am trying to upload to my onedrive.But the download progress is stuck at 100% and upload is not working.
2022-10-15 15:39:43,645 INFO Thread-4 (__onDownloadStarted) bot onDownloadStarted: goong.s1.br.48-pahe.ph.part1.rar - Gid: 5fa90b7664d64445
2022-10-15 15:39:43,646 INFO MainThread bot Aria2Download started: 5fa90b7664d64445
2022-10-15 15:40:28,639 INFO Thread-5 (__onDownloadComplete) bot onDownloadComplete: goong.s1.br.48-pahe.ph.part1.rar - Gid: 5fa90b7664d64445
2022-10-15 15:40:33,824 ERROR MainThread asyncio Task exception was never retrieved
future: <Task finished name='Task-3210' coro=<setInterval.setInterval() done, defined at /usr/src/app/bot/helper/ext_utils/bot_utils.py:176> exception=RuntimeError('<asyncio.locks.Lock object at 0xffff8d5adc30 [unlocked, waiters:1]> is bound to a different event loop')>
Traceback (most recent call last):
File "/usr/src/app/bot/helper/ext_utils/bot_utils.py", line 181, in setInterval
await self.action()
File "/usr/src/app/bot/helper/ext_utils/message_utils.py", line 119, in update_all_messages
msg, buttons = await get_readable_message()
File "/usr/src/app/bot/helper/ext_utils/bot_utils.py", line 96, in get_readable_message
async with status_dict_lock:
File "/usr/lib/python3.10/asyncio/locks.py", line 14, in aenter
await self.acquire()
File "/usr/lib/python3.10/asyncio/locks.py", line 106, in acquire
fut = self._get_loop().create_future()
File "/usr/lib/python3.10/asyncio/mixins.py", line 30, in _get_loop
raise RuntimeError(f'{self!r} is bound to a different event loop')
RuntimeError: <asyncio.locks.Lock object at 0xffff8d5adc30 [unlocked, waiters:1]> is bound to a different event loop
2022-10-15 15:47:26,393 INFO MainThread pyrogram.connection.connection Connecting...
2022-10-15 15:47:26,450 INFO MainThread pyrogram.connection.connection Connected! Production DC5 (media) - IPv4 - TCPAbridgedO
2022-10-15 15:47:26,451 INFO MainThread pyrogram.session.session NetworkTask started
2022-10-15 15:47:26,753 INFO MainThread pyrogram.session.session Session initialized: Layer 146
2022-10-15 15:47:26,753 INFO MainThread pyrogram.session.session Device: CPython 3.10.6 - Pyrogram 2.0.57
2022-10-15 15:47:26,753 INFO MainThread pyrogram.session.session System: Linux 5.15.0-1019-oracle (EN)
2022-10-15 15:47:26,753 INFO MainThread pyrogram.session.session Session started

Magnet link not responding

/mirror
/qbmirror

Nothing happens, even though I reply to the magnet link, there is still no response

qbittorrent download not responding

nothing happens

2022-08-06 12:17:13,058 INFO MainThread bot Rclone file loaded!! 2022-08-06 12:17:13,582 INFO MainThread bot Initializing Aria2c 2022-08-06 12:17:39,076 INFO MainThread bot MEGA_API_KEY not provided! 2022-08-06 12:17:40,613 INFO MainThread telethon.network.mtprotosender Connecting to 149.154.167.51:443/TcpFull... 2022-08-06 12:17:42,482 INFO MainThread telethon.network.mtprotosender Connection to 149.154.167.51:443/TcpFull complete! 2022-08-06 12:17:43,848 INFO MainThread telethon.client.users Phone migrated to 5 2022-08-06 12:17:43,848 INFO MainThread telethon.client.telegrambaseclient Reconnecting to new data center 5 2022-08-06 12:17:44,101 INFO MainThread telethon.network.mtprotosender Disconnecting from 149.154.167.51:443/TcpFull... 2022-08-06 12:17:44,101 INFO MainThread telethon.network.mtprotosender Disconnection from 149.154.167.51:443/TcpFull complete! 2022-08-06 12:17:44,101 INFO MainThread telethon.network.mtprotosender Connecting to 91.108.56.128:443/TcpFull... 2022-08-06 12:17:45,287 INFO MainThread telethon.network.mtprotosender Connection to 91.108.56.128:443/TcpFull complete! 2022-08-06 12:17:45,562 INFO MainThread bot Telethon client created. 2022-08-06 12:17:46,041 INFO MainThread pyrogram.session.auth Start creating a new auth key on DC2 2022-08-06 12:17:46,041 INFO MainThread pyrogram.connection.connection Connecting... 2022-08-06 12:17:46,288 INFO MainThread pyrogram.connection.connection Connected! Production DC2 - IPv4 - TCPAbridgedO 2022-08-06 12:17:48,049 INFO MainThread pyrogram.session.auth Done auth key exchange: DhGenOk 2022-08-06 12:17:48,049 INFO MainThread pyrogram.connection.connection Disconnected 2022-08-06 12:17:48,223 INFO MainThread pyrogram.connection.connection Connecting... 2022-08-06 12:17:48,459 INFO MainThread pyrogram.connection.connection Connected! Production DC2 - IPv4 - TCPAbridgedO 2022-08-06 12:17:48,459 INFO MainThread pyrogram.session.session NetworkTask started 2022-08-06 12:17:48,973 INFO MainThread pyrogram.session.internals.msg_id Time synced: 2022-08-06 12:17:48.858429 UTC 2022-08-06 12:17:49,531 INFO MainThread pyrogram.session.session Session initialized: Layer 143 2022-08-06 12:17:49,532 INFO MainThread pyrogram.session.session Device: CPython 3.10.4 - Pyrogram 2.0.35 2022-08-06 12:17:49,532 INFO MainThread pyrogram.session.session System: Linux 5.4.0-1078-oracle (EN) 2022-08-06 12:17:49,532 INFO MainThread pyrogram.session.session Session started 2022-08-06 12:17:49,560 INFO MainThread pyrogram.session.session PingTask started 2022-08-06 12:17:49,871 INFO MainThread pyrogram.session.session PingTask stopped 2022-08-06 12:17:49,872 INFO MainThread pyrogram.connection.connection Disconnected 2022-08-06 12:17:49,872 INFO MainThread pyrogram.session.session NetworkTask stopped 2022-08-06 12:17:49,872 INFO MainThread pyrogram.session.session Session stopped 2022-08-06 12:17:49,962 INFO MainThread pyrogram.session.auth Start creating a new auth key on DC5 2022-08-06 12:17:49,962 INFO MainThread pyrogram.connection.connection Connecting... 2022-08-06 12:17:50,041 INFO MainThread pyrogram.connection.connection Connected! Production DC5 - IPv4 - TCPAbridgedO 2022-08-06 12:17:51,269 INFO MainThread pyrogram.session.auth Done auth key exchange: DhGenOk 2022-08-06 12:17:51,269 INFO MainThread pyrogram.connection.connection Disconnected 2022-08-06 12:17:51,388 INFO MainThread pyrogram.connection.connection Connecting... 2022-08-06 12:17:51,466 INFO MainThread pyrogram.connection.connection Connected! Production DC5 - IPv4 - TCPAbridgedO 2022-08-06 12:17:51,466 INFO MainThread pyrogram.session.session NetworkTask started 2022-08-06 12:17:51,869 INFO MainThread pyrogram.session.session Session initialized: Layer 143 2022-08-06 12:17:51,869 INFO MainThread pyrogram.session.session Device: CPython 3.10.4 - Pyrogram 2.0.35 2022-08-06 12:17:51,869 INFO MainThread pyrogram.session.session System: Linux 5.4.0-1078-oracle (EN) 2022-08-06 12:17:51,869 INFO MainThread pyrogram.session.session Session started 2022-08-06 12:17:51,870 INFO MainThread pyrogram.session.session PingTask started 2022-08-06 12:17:52,340 INFO MainThread pyrogram.dispatcher Started 8 HandlerTasks 2022-08-06 12:17:52,340 INFO MainThread bot pyro Bot client created 2022-08-06 12:17:52,748 INFO MainThread pyrogram.connection.connection Connecting... 2022-08-06 12:17:52,828 INFO MainThread pyrogram.connection.connection Connected! Production DC5 - IPv4 - TCPAbridgedO 2022-08-06 12:17:52,828 INFO MainThread pyrogram.session.session NetworkTask started 2022-08-06 12:17:53,216 INFO MainThread pyrogram.session.session Session initialized: Layer 143 2022-08-06 12:17:53,216 INFO MainThread pyrogram.session.session Device: CPython 3.10.4 - Pyrogram 2.0.35 2022-08-06 12:17:53,216 INFO MainThread pyrogram.session.session System: Linux 5.4.0-1078-oracle (EN) 2022-08-06 12:17:53,216 INFO MainThread pyrogram.session.session Session started 2022-08-06 12:17:53,270 INFO MainThread pyrogram.session.session PingTask started 2022-08-06 12:17:53,539 INFO MainThread pyrogram.dispatcher Started 8 HandlerTasks 2022-08-06 12:17:53,715 INFO MainThread pyrogram.dispatcher Stopped 8 HandlerTasks 2022-08-06 12:17:53,715 INFO MainThread pyrogram.session.session PingTask stopped 2022-08-06 12:17:53,715 INFO MainThread pyrogram.connection.connection Disconnected 2022-08-06 12:17:53,715 INFO MainThread pyrogram.session.session NetworkTask stopped 2022-08-06 12:17:53,715 INFO MainThread pyrogram.session.session Session stopped 2022-08-06 12:17:54,120 INFO MainThread pyrogram.connection.connection Connecting... 2022-08-06 12:17:54,201 INFO MainThread pyrogram.connection.connection Connected! Production DC5 - IPv4 - TCPAbridgedO 2022-08-06 12:17:54,201 INFO MainThread pyrogram.session.session NetworkTask started 2022-08-06 12:17:54,609 INFO MainThread pyrogram.session.session Session initialized: Layer 143 2022-08-06 12:17:54,609 INFO MainThread pyrogram.session.session Device: CPython 3.10.4 - Pyrogram 2.0.35 2022-08-06 12:17:54,609 INFO MainThread pyrogram.session.session System: Linux 5.4.0-1078-oracle (EN) 2022-08-06 12:17:54,609 INFO MainThread pyrogram.session.session Session started 2022-08-06 12:17:54,663 INFO MainThread pyrogram.session.session PingTask started 2022-08-06 12:17:54,841 INFO MainThread pyrogram.dispatcher Started 8 HandlerTasks 2022-08-06 12:17:54,841 INFO MainThread bot pyrogram_session client created 2022-08-06 12:17:55,025 ERROR MainThread root The variable was not found in either the constants or environment, variable is :- UPTOBOX_TOKEN 2022-08-06 12:17:59,486 INFO MainThread telethon.client.uploads Uploading file of 6565 bytes in 1 chunks of 131072 2022-08-06 12:19:30,596 ERROR MainThread pyrogram.dispatcher 'builtin_function_or_method' object has no attribute 'time' Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/pyrogram/dispatcher.py", line 240, in handler_worker await handler.callback(self.client, *args) File "/usr/src/app/bot/core/handlers/handle_mirror_cm.py", line 29, in handle_qbit_mirror_command await mirror(client, message, isQbit=True) File "/usr/src/app/bot/core/handlers/handle_mirror_cm.py", line 114, in mirror state, message, path, name = await qbit_dl.add_qb_torrent(link) File "/usr/src/app/bot/downloaders/qbit/qbit_downloader.py", line 39, in add_qb_torrent time_s= str(time.time()).replace(".","") AttributeError: 'builtin_function_or_method' object has no attribute 'time' 2022-08-06 12:19:41,182 INFO MainThread telethon.client.uploads Uploading file of 7491 bytes in 1 chunks of 131072
image

Feedback

Bro can you remove this flag --drive-server-side-across-configs as if we are copying from restricted drive to non restricted drive it throws error if this flag isn't used it works perfectly.
or keep that flag optional with button
Thanks

Improved Rclone with SA account.

I think your project is awesome. Because me and a lot of others prefer to use Rclone instead of Gd-utils to upload data to Drive.

But it would be great if you could combine a few things:

  • Replace Rclone with Gclone, it will help us to clone with ID (Link drive) and use SA to exceed 750g/day limit.
    (https://github.com/dogbutcat/gclone)
  • Deploy code using "Github Action" on heroku.

Those are small issues that I think if you have time you can improve on it.

Feature Request

  1. Dynamic Rclone config support.
  2. Mirror files to multiple cloud storage automatically(when configured).
  3. Sync two remote cloud storages(like we can use /copy commands to copy files from one storage to another, what if it can be done automatically, by that i mean whenever a new file is add to say storage A the bot will sync that file to storage B, without using any commands, once configured)
  4. Support for ytdlp

Thats all, btw i really liked your bot.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.