parent
a4fa968acf
commit
66ec9b34d2
@ -1,11 +1,16 @@
|
|||||||
import requests
|
import requests
|
||||||
from utils.console import print_step
|
from utils.console import print_step
|
||||||
|
|
||||||
|
|
||||||
def checkversion(__VERSION__):
|
def checkversion(__VERSION__):
|
||||||
response = requests.get("https://api.github.com/repos/elebumm/RedditVideoMakerBot/releases/latest")
|
response = requests.get(
|
||||||
latestversion = (response.json()["tag_name"])
|
"https://api.github.com/repos/elebumm/RedditVideoMakerBot/releases/latest"
|
||||||
|
)
|
||||||
|
latestversion = response.json()["tag_name"]
|
||||||
if __VERSION__ == latestversion:
|
if __VERSION__ == latestversion:
|
||||||
print_step(f"You are using the newest version ({__VERSION__}) of the bot")
|
print_step(f"You are using the newest version ({__VERSION__}) of the bot")
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
print_step(f"You are using an older version ({__VERSION__}) of the bot. Download the newest version ({latestversion}) from https://github.com/elebumm/RedditVideoMakerBot/releases/latest")
|
print_step(
|
||||||
|
f"You are using an older version ({__VERSION__}) of the bot. Download the newest version ({latestversion}) from https://github.com/elebumm/RedditVideoMakerBot/releases/latest"
|
||||||
|
)
|
||||||
|
Loading…
Reference in new issue