Skip to content

Commit

Permalink
pre-commit: run hooks
Browse files Browse the repository at this point in the history
Signed-off-by: Bian <[email protected]>
  • Loading branch information
BianSepang committed Mar 16, 2022
1 parent 3030620 commit af84cd5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ based on [ProjectBish](https://github.com/adekmaulana/ProjectBish) Userbot
## Variable For Heroku Vars Settings
<details>
<summary>Click for more details</summary>

**1. Required Variable name and value**
- `API_KEY` __# Get this value from [Telegram.org](https://my.telegram.org)__.
- `API_HASH` __# Get this value from [Telegram.org](https://my.telegram.org)__.
Expand Down Expand Up @@ -75,8 +75,8 @@ based on [ProjectBish](https://github.com/adekmaulana/ProjectBish) Userbot
# Deploy
**Heroku (GitHub Actions)**
1. Create github account and heroku account
2. Fork THIS repository [RECOMMEND TO ENABLE DEKSTOP MODE IN YOUR BROWSER]
3. Go to Your Gitub Forked repository settings. [[example pict]](https://telegra.ph/file/5f8e378f13f41ff7971de.jpg), Scroll down then Click Secret > actions
2. Fork this repository [RECOMMEND TO ENABLE DEKSTOP MODE IN YOUR BROWSER]
3. Go to Your GitHub Forked repository settings. [[example pict]](https://telegra.ph/file/5f8e378f13f41ff7971de.jpg), Scroll down then Click Secret > actions
4. Fill All credentials required in Github secrets
- `HEROKU_API`. Fill your [Heroku api key](https://dashboard.heroku.com/account)
- `HEROKY_APP`. Fill your Heroku app name. **This name should only contain lowercase letters, numbers, and dashes.**
Expand Down
14 changes: 7 additions & 7 deletions userbot/utils/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def humanbytes(size: int) -> str:
if size is None or isinstance(size, str):
return ""

power = 2 ** 10
power = 2**10
raised_to_pow = 0
dict_power_n = {0: "", 1: "Ki", 2: "Mi", 3: "Gi", 4: "Ti"}
while size > power:
Expand All @@ -59,12 +59,12 @@ def time_formatter(seconds: int) -> str:

def human_to_bytes(size: str) -> int:
units = {
"M": 2 ** 20,
"MB": 2 ** 20,
"G": 2 ** 30,
"GB": 2 ** 30,
"T": 2 ** 40,
"TB": 2 ** 40,
"M": 2**20,
"MB": 2**20,
"G": 2**30,
"GB": 2**30,
"T": 2**40,
"TB": 2**40,
}

size = size.upper()
Expand Down

0 comments on commit af84cd5

Please sign in to comment.