| 4 | |
| 5 | |
| 6 | def 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 | ) |