4 Commits

Author SHA1 Message Date
7f1f86ca03 Fixed update checker behavior 2023-03-22 21:26:05 +01:00
c600747848 Bump py-cord to 2.4.1 2023-03-22 21:09:58 +01:00
a2bd55dcdf Updated version to 1.9 2023-03-22 21:09:32 +01:00
98ac531a36 Changed version API requests 2023-03-22 21:09:09 +01:00
3 changed files with 9 additions and 9 deletions

View File

@@ -1,2 +1,2 @@
ujson~=5.7.0
py-cord[speed]~=2.3.2
py-cord[speed]~=2.4.1

View File

@@ -1,2 +1,2 @@
py-cord~=2.3.2
py-cord~=2.4.1
requests~=2.28.2

View File

@@ -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"]:
try:
serv_ver = loads(
get("https://api.end-play.xyz/version?app=yusarinbot&apikey=publickey").text
)["version"]
if float(serv_ver) > version:
appendLog(
f"YusarinBot version {serv_ver} is available. Download new version here: https://git.end-play.xyz/profitroll/YusarinBot/releases/latest"
)
appendLog(f"Currently using YusarinBot v{str(version)}")
try:
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 {releases[0]['tag_name']} is available. Download new version here: {releases[0]['html_url']}"
)
except Exception as exp:
appendLog(
f"Could not get YusarinBot cloud version due to {exp}. Currently using {str(version)}"