Compare commits
4 Commits
af24a055b6
...
v1.9
Author | SHA1 | Date | |
---|---|---|---|
7f1f86ca03 | |||
c600747848 | |||
a2bd55dcdf | |||
98ac531a36 |
@@ -1,2 +1,2 @@
|
||||
ujson~=5.7.0
|
||||
py-cord[speed]~=2.3.2
|
||||
py-cord[speed]~=2.4.1
|
@@ -1,2 +1,2 @@
|
||||
py-cord~=2.3.2
|
||||
py-cord~=2.4.1
|
||||
requests~=2.28.2
|
14
yusarin.py
14
yusarin.py
@@ -12,7 +12,7 @@ from os import getpid
|
||||
from functions import *
|
||||
|
||||
pid = getpid()
|
||||
version = 1.8
|
||||
version = 1.9
|
||||
|
||||
if (
|
||||
loadJson("config.json")["owner"] == "SET-OWNER-ID"
|
||||
@@ -24,15 +24,15 @@ if (
|
||||
exit()
|
||||
|
||||
if loadJson("config.json")["check_for_updates"]:
|
||||
appendLog(f"Currently using YusarinBot v{str(version)}")
|
||||
try:
|
||||
serv_ver = loads(
|
||||
get("https://api.end-play.xyz/version?app=yusarinbot&apikey=publickey").text
|
||||
)["version"]
|
||||
if float(serv_ver) > version:
|
||||
releases = get(
|
||||
"https://git.end-play.xyz/api/v1/repos/profitroll/YusarinBot/releases?draft=false&pre-release=false&page=1&limit=1"
|
||||
).json()
|
||||
if float(releases[0]["tag_name"].replace("v", "")) > version:
|
||||
appendLog(
|
||||
f"YusarinBot version {serv_ver} is available. Download new version here: https://git.end-play.xyz/profitroll/YusarinBot/releases/latest"
|
||||
f"YusarinBot version {releases[0]['tag_name']} is available. Download new version here: {releases[0]['html_url']}"
|
||||
)
|
||||
appendLog(f"Currently using YusarinBot v{str(version)}")
|
||||
except Exception as exp:
|
||||
appendLog(
|
||||
f"Could not get YusarinBot cloud version due to {exp}. Currently using {str(version)}"
|
||||
|
Reference in New Issue
Block a user