MCPcopy Index your code
hub / github.com/elebumm/RedditVideoMakerBot / checkversion

Function checkversion

utils/version.py:6–21  ·  view source on GitHub ↗
(__VERSION__: str)

Source from the content-addressed store, hash-verified

4
5
6def checkversion(__VERSION__: str):
7 response = requests.get(
8 "https://api.github.com/repos/elebumm/RedditVideoMakerBot/releases/latest"
9 )
10 latestversion = response.json()["tag_name"]
11 if __VERSION__ == latestversion:
12 print_step(f"You are using the newest version ({__VERSION__}) of the bot")
13 return True
14 elif __VERSION__ < latestversion:
15 print_step(
16 f"You are using an older version ({__VERSION__}) of the bot. Download the newest version ({latestversion}) from https://github.com/elebumm/RedditVideoMakerBot/releases/latest"
17 )
18 else:
19 print_step(
20 f"Welcome to the test version ({__VERSION__}) of the bot. Thanks for testing and feel free to report any bugs you find."
21 )

Callers 1

main.pyFile · 0.90

Calls 1

print_stepFunction · 0.90

Tested by

no test coverage detected