From 98ac531a36bf6288575720532637146c71ccb331 Mon Sep 17 00:00:00 2001 From: profitroll Date: Wed, 22 Mar 2023 21:09:09 +0100 Subject: [PATCH] Changed version API requests --- yusarin.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/yusarin.py b/yusarin.py index 3c7d759..d0fd833 100644 --- a/yusarin.py +++ b/yusarin.py @@ -25,12 +25,14 @@ if ( 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: + release = loads( + get( + "https://git.end-play.xyz/api/v1/repos/profitroll/YusarinBot/releases?draft=false&pre-release=false&page=1&limit=1" + ).json() + )[0] + if float(release["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 {release['tag_name']} is available. Download new version here: {release['html_url']}" ) appendLog(f"Currently using YusarinBot v{str(version)}") except Exception as exp: