Coverage for cmds/ver.py: 100%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1"""
2ver.py
4includes ver
5"""
7from version import version
8import error
10async def ver(*args):
11 """
12 ver
14 returns formated version and date of update
15 """
17 # fix args
18 args = args[1:]
20 # check args
21 if len(args) > 0:
22 raise error.UnknownArgumentError
24 with open('date.txt', 'r', encoding="utf-8") as date:
25 with open("data.txt", "r", encoding="utf-8") as data:
26 output = '\n'.join([
27 f'Discord bot version: {version}',
28 f'Last updated: {date.readline().strip()}',
29 f'Database last updated: {data.readline().strip()}',
30 ])
31 return f'```{output}```'