-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestservice.py
42 lines (36 loc) · 1.06 KB
/
testservice.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
allcommands = {}
def register(commands):
for cmd in allcommands.values():
commands.command_info[cmd.name] = {
"description": cmd.desc,
"syntax": cmd.syntax,
"example": cmd.example,
"function": cmd.function,
"category": cmd.category,
}
class Commands:
class Uwu:
def __init__(self):
self.name = "uwu"
self.desc = "Prints uwu"
self.syntax = "uwu"
self.example = "uwu"
self.function = self.uwu
self.category = "otherstuff"
allcommands[self.name] = self
def uwu(self):
return "uwu"
class Hello:
def __init__(self):
self.name = "hello"
self.desc = "Prints hello"
self.syntax = "hello"
self.example = "hello"
self.function = self.hello
self.category = "greetings"
allcommands[self.name] = self
def hello(self):
return "hello"
#initialize commands
Commands.Uwu()
Commands.Hello()