Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
v4.6.2 (#46)
Browse files Browse the repository at this point in the history
- Added guide deploy using heroku cli
- Fixed SpeedTest
- Make easy to cancel

Co-authored-by: Hikikomori San <[email protected]>
Co-authored-by: ydner <[email protected]>
  • Loading branch information
3 people authored Apr 8, 2021
1 parent 174d96b commit 2a29a9c
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 4 deletions.
48 changes: 47 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This is a telegram bot writen in python for mirroring files on the internet to o

- Mirroring direct download links to Google Drive
- Mirroring Mega.nz links to Google Drive (In development stage)
- Mirroring Uptobox.com links to Google Drive (Uptobox account must be premium)
- Mirroring Uptobox.com links to Google Drive (**NOTE**: Uptobox account must be premium)
- Copy files from someone's drive to your drive (Using Autorclone)
- Download/upload progress, speeds and ETAs
- Docker support
Expand Down Expand Up @@ -144,6 +144,52 @@ Give Star & Fork this repo, then upload **token.pickle** to your forks

<p><a href="https://heroku.com/deploy"> <img src="https://www.herokucdn.com/deploy/button.svg" alt="Deploy to Heroku" /></a></p>

## Deploying on Heroku using heroku-cli

<details>
<summary><b>Click here for more details</b></summary>

- Install [Heroku cli](https://devcenter.heroku.com/articles/heroku-cli)
- Login into your heroku account with command:
```
heroku login
```
- Create a new heroku app:
```
heroku create <appname>
```
- Select This App in your Heroku-cli:
```
heroku git:remote -a <appname>
```
- Change Dyno Stack to a Docker Container:
```
heroku stack:set container -a <appname>
```
- Add Private Credentials and Config Stuff:
```
git add -f credentials.json token.pickle config.env heroku.yml
```
- Commit new changes:
```
git commit -m "Added Creds."
```
- Push Code to Heroku:
```
git push heroku master --force
```
- Restart Worker by these commands,You can Do it manually too in heroku.
- For Turning off the Bot:
```
heroku ps:scale worker=0 -a <appname>
```
- For Turning on the Bot:
```
heroku ps:scale worker=1 -a <appname>
```

</details>

## Bot commands to be set in [@BotFather](https://t.me/BotFather)

```
Expand Down
2 changes: 1 addition & 1 deletion bot/helper/ext_utils/bot_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def get_readable_message():
except:
pass
if download.status() == MirrorStatus.STATUS_DOWNLOADING:
msg += f"\n<b>GID:</b> <code>{download.gid()}</code>"
msg += f"\n<b>To Stop:</b> <code>/{BotCommands.CancelMirror} {download.gid()}</code>"
msg += "\n\n"
return msg

Expand Down
2 changes: 1 addition & 1 deletion bot/modules/usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def dyno_usage(update, context):
app = Heroku.app(HEROKU_APP_NAME)
else:
sendMessage(
"Please insert your Heroku App Name and API Key in Vars",
"Please insert your HEROKU_APP_NAME and HEROKU_API_KEY",
context.bot,
update
)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ feedparser
natsort
heroku3
aiohttp
speedtest-cli>=2.1.2
speedtest-cli
messages
lxml
telegraph

0 comments on commit 2a29a9c

Please sign in to comment.