add(laucnher|update): add bot.version and --update
This commit is contained in:
parent
712339968c
commit
02d279b6c4
8 changed files with 71 additions and 12 deletions
cogs/utils
12
cogs/utils/version.py
Normal file
12
cogs/utils/version.py
Normal 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}'
|
Loading…
Add table
Add a link
Reference in a new issue