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

Commit 2a29a9c

Browse files
breakdownsh1kikomor1ydner
authored
v4.6.2 (#46)
- 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]>
1 parent 174d96b commit 2a29a9c

File tree

4 files changed

+50
-4
lines changed

4 files changed

+50
-4
lines changed

README.md

+47-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This is a telegram bot writen in python for mirroring files on the internet to o
99

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

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

147+
## Deploying on Heroku using heroku-cli
148+
149+
<details>
150+
<summary><b>Click here for more details</b></summary>
151+
152+
- Install [Heroku cli](https://devcenter.heroku.com/articles/heroku-cli)
153+
- Login into your heroku account with command:
154+
```
155+
heroku login
156+
```
157+
- Create a new heroku app:
158+
```
159+
heroku create <appname>
160+
```
161+
- Select This App in your Heroku-cli:
162+
```
163+
heroku git:remote -a <appname>
164+
```
165+
- Change Dyno Stack to a Docker Container:
166+
```
167+
heroku stack:set container -a <appname>
168+
```
169+
- Add Private Credentials and Config Stuff:
170+
```
171+
git add -f credentials.json token.pickle config.env heroku.yml
172+
```
173+
- Commit new changes:
174+
```
175+
git commit -m "Added Creds."
176+
```
177+
- Push Code to Heroku:
178+
```
179+
git push heroku master --force
180+
```
181+
- Restart Worker by these commands,You can Do it manually too in heroku.
182+
- For Turning off the Bot:
183+
```
184+
heroku ps:scale worker=0 -a <appname>
185+
```
186+
- For Turning on the Bot:
187+
```
188+
heroku ps:scale worker=1 -a <appname>
189+
```
190+
191+
</details>
192+
147193
## Bot commands to be set in [@BotFather](https://t.me/BotFather)
148194

149195
```

bot/helper/ext_utils/bot_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def get_readable_message():
109109
except:
110110
pass
111111
if download.status() == MirrorStatus.STATUS_DOWNLOADING:
112-
msg += f"\n<b>GID:</b> <code>{download.gid()}</code>"
112+
msg += f"\n<b>To Stop:</b> <code>/{BotCommands.CancelMirror} {download.gid()}</code>"
113113
msg += "\n\n"
114114
return msg
115115

bot/modules/usage.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def dyno_usage(update, context):
1919
app = Heroku.app(HEROKU_APP_NAME)
2020
else:
2121
sendMessage(
22-
"Please insert your Heroku App Name and API Key in Vars",
22+
"Please insert your HEROKU_APP_NAME and HEROKU_API_KEY",
2323
context.bot,
2424
update
2525
)

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ feedparser
1818
natsort
1919
heroku3
2020
aiohttp
21-
speedtest-cli>=2.1.2
21+
speedtest-cli
2222
messages
2323
lxml
2424
telegraph

0 commit comments

Comments
 (0)