Skip to content

Commit

Permalink
v4.6.7 (breakdowns#60)
Browse files Browse the repository at this point in the history
- Tidying Up
- Fixed /cancel message

Co-authored-by: FA Tulloh
<[email protected]>
Co-authored-by: Shivam Jha
<[email protected]>
Co-authored-by: Dev Singh Rajput
<[email protected]>
  • Loading branch information
breakdowns authored Apr 22, 2021
1 parent 9cca99d commit 70bf8cc
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,32 @@ NTFS, RPM, SquashFS, UDF, VHD, XAR, Z.

# How to deploy?
Deploying is pretty much straight forward and is divided into several steps as follows:

## Installing requirements

- Clone this repo:
```
git clone https://github.com/breakdowns/slam-mirrorbot mirrorbot/
cd mirrorbot
git clone https://github.com/magneto261290/magneto-python-aria mirror-bot/
cd mirror-bot
```

- Install requirements
For Debian based distros
```
sudo apt install python3
sudo snap install docker
```
Install Docker by following the [official docker docs](https://docs.docker.com/engine/install/debian/)


- For Arch and it's derivatives:
```
sudo pacman -S docker python
```

- Install dependencies for running setup scripts:
```
pip3 install -r requirements-cli.txt
```

## Setting up config file
<details>
<summary><b>Click here for more details</b></summary>
Expand Down Expand Up @@ -112,7 +118,7 @@ shortzon.com
- Visit the [Google Cloud Console](https://console.developers.google.com/apis/credentials)
- 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.
- Choose Other and Create.
- Use the download button to download your credentials.
- Move that file to the root of mirrorbot, and rename it to credentials.json
- Visit [Google API page](https://console.developers.google.com/apis/library)
Expand Down
4 changes: 2 additions & 2 deletions bot/helper/ext_utils/bot_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class MirrorStatus:
STATUS_UPLOADING = "Uploading...πŸ“€"
STATUS_DOWNLOADING = "Downloading...πŸ“₯"
STATUS_WAITING = "Queued...πŸ“"
STATUS_FAILED = "Failed 🚫. Cleaning download"
STATUS_CANCELLED = "Cancelled...❌"
STATUS_FAILED = "Failed 🚫. Cleaning Download..."
STATUS_CANCELLED = "Cancelled ❌. Cleaning Download..."
STATUS_ARCHIVING = "Archiving...πŸ”"
STATUS_EXTRACTING = "Extracting...πŸ“‚"

Expand Down
4 changes: 2 additions & 2 deletions bot/modules/cancel_mirror.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def cancel_mirror(update, context):
dl = download_dict[mirror_message.message_id]
if len(args) == 1:
if mirror_message is None or mirror_message.message_id not in keys:
if BotCommands.MirrorCommand in mirror_message.text or \
BotCommands.TarMirrorCommand in mirror_message.text:
if BotCommands.MirrorCommand in update.message.text or \
BotCommands.TarMirrorCommand in update.message.text:
msg = "Mirror already have been cancelled"
sendMessage(msg, context.bot, update)
return
Expand Down
7 changes: 7 additions & 0 deletions requirements-cli.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
oauth2client
google-api-python-client
progress
progressbar2
httplib2shim
google_auth_oauthlib
pyrogram

0 comments on commit 70bf8cc

Please sign in to comment.