From b19caf7f4813b97649ad054324ee086d7cd2d25c Mon Sep 17 00:00:00 2001 From: Hafitz Setya <71178188+breakdowns@users.noreply.github.com> Date: Thu, 13 May 2021 09:44:59 +0700 Subject: [PATCH] Add some command in /help --- README.md | 4 ++-- bot/__main__.py | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8645604..378db0a 100644 --- a/README.md +++ b/README.md @@ -158,7 +158,7 @@ sudo docker run mirrorbot

-## Using Service Accounts for uploading to avoid user rate limit +# Using Service Accounts for uploading to avoid user rate limit For Service Account to work, you must set **USE_SERVICE_ACCOUNTS=**"True" in config file or environment variables, Many thanks to [AutoRClone](https://github.com/xyou365/AutoRclone) for the scripts. **NOTE**: Using Service Accounts is only recommended while uploading to a Team Drive. @@ -187,7 +187,7 @@ python3 gen_sa_accounts.py --download-keys project_id python3 add_to_team_drive.py -d SharedTeamDriveSrcID ``` -## Youtube-dl authentication using .netrc file +# Youtube-dl authentication using .netrc file For using your premium accounts in Youtube-dl, edit the netrc file according to following format: ``` machine host login username password my_youtube_password diff --git a/bot/__main__.py b/bot/__main__.py index ef7644b..2c9a57b 100644 --- a/bot/__main__.py +++ b/bot/__main__.py @@ -23,7 +23,7 @@ now=datetime.now(pytz.timezone('Asia/Jakarta')) @run_async def stats(update, context): - currentTime = get_readable_time((time.time() - botStartTime)) + currentTime = get_readable_time(time.time() - botStartTime) current = now.strftime('%Y/%m/%d %I:%M:%S %p') total, used, free = shutil.disk_usage('.') total = get_readable_file_size(total) @@ -117,13 +117,13 @@ def bot_help(update, context): /{BotCommands.StatusCommand}: Shows a status of all the downloads -/{BotCommands.ListCommand} [search term]: Searches the search term in the Google drive, if found replies with the link +/{BotCommands.ListCommand} [search term]: Searches the search term in the Google Drive, if found replies with the link /{BotCommands.StatsCommand}: Show Stats of the machine the bot is hosted on -/{BotCommands.AuthorizeCommand}: Authorize a chat or a user to use the bot (Can only be invoked by owner of the bot) +/{BotCommands.AuthorizeCommand}: Authorize a chat or a user to use the bot (Can only be invoked by Owner of the bot) -/{BotCommands.AuthListCommand}: See Authorized list (Can only be invoked by owner of the bot) +/{BotCommands.AuthListCommand}: See Authorized list (Can only be invoked by Owner of the bot) /{BotCommands.LogCommand}: Get a log file of the bot. Handy for getting crash reports @@ -133,6 +133,10 @@ def bot_help(update, context): /{BotCommands.RepoCommand}: Get the bot repo. +/shell: Run commands in Shell (Terminal). + +/eval: Run Python code line. + /mediainfo: Get detailed info about replied media. /tshelp: Get help for Torrent search module.