add(laucnher|update): add bot.version and --update

This commit is contained in:
Romain J 2019-09-10 23:20:56 +02:00
commit 02d279b6c4
8 changed files with 71 additions and 12 deletions
cogs/utils

12
cogs/utils/version.py Normal file
View file

@ -0,0 +1,12 @@
class Version:
def __init__(self, major: int, minor: int, patch: int, **kwargs):
self.major: int = major
self.minor: int = minor
self.patch: int = patch
self.pre_release = kwargs.get('pre_release', '')
self.build = kwargs.get('build', '')
def __str__(self) -> str:
build = self.build[:10]
return f'v{self.major}.{self.minor}.{self.patch}{self.pre_release}-{build}'