-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcommands.py
35 lines (34 loc) · 845 Bytes
/
commands.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
##this file handles commands
commands_array = [
("$help",0),
("$send",3),
####### ("$request",2),
("$create",1),
("$balance","any"),
("$print",2),
("$dev-db",0),
("$clear-contracts",0),
("$links",0),
("$config",2),
("$stats",1),
("$whois", "any"),
("$send-each", "any"),
("$set-balance", 2),
("$alter-balance", 2),
("$set-balance-each", "any"),
("$wallet-settings", 4),
("$trade","any"),
("$accept",2),
("$quiz",0),
("$shop", 2),
("$market",0),
("$work",0),
("$work-conditional","any")
]
def is_valid_command(user_message):
user_array = user_message.content.split(" ")
for command in commands_array:
if(command[0] == user_array[0]):
if(command[1]==len(user_array)-1 or command[1] == "any" ):
return True
return False