Compare commits
4 Commits
af24a055b6
...
v1.9
Author | SHA1 | Date | |
---|---|---|---|
7f1f86ca03 | |||
c600747848 | |||
a2bd55dcdf | |||
98ac531a36 |
@@ -1,2 +1,2 @@
|
|||||||
ujson~=5.7.0
|
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
|
requests~=2.28.2
|
18
yusarin.py
18
yusarin.py
@@ -12,7 +12,7 @@ from os import getpid
|
|||||||
from functions import *
|
from functions import *
|
||||||
|
|
||||||
pid = getpid()
|
pid = getpid()
|
||||||
version = 1.8
|
version = 1.9
|
||||||
|
|
||||||
if (
|
if (
|
||||||
loadJson("config.json")["owner"] == "SET-OWNER-ID"
|
loadJson("config.json")["owner"] == "SET-OWNER-ID"
|
||||||
@@ -24,15 +24,15 @@ if (
|
|||||||
exit()
|
exit()
|
||||||
|
|
||||||
if loadJson("config.json")["check_for_updates"]:
|
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)}")
|
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:
|
except Exception as exp:
|
||||||
appendLog(
|
appendLog(
|
||||||
f"Could not get YusarinBot cloud version due to {exp}. Currently using {str(version)}"
|
f"Could not get YusarinBot cloud version due to {exp}. Currently using {str(version)}"
|
||||||
|
Reference in New Issue
Block a user