-
Notifications
You must be signed in to change notification settings - Fork 0
/
command_list.py
63 lines (54 loc) · 1.79 KB
/
command_list.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
commands = {
'help': {
'name': '$help',
'help_message': 'Display help about a command.',
'usage': '$help <command>'
},
'8ball': {
'name': '$8ball',
'help_message': 'Answer a yes/no question.',
'usage': '$8ball <yes/no question>'
},
'ban': {
'name': '$ban',
'help_message': 'Ban an user. Users can\'t rejoin when banned. Requires the ban user permission.',
'usage': '$ban <username> OR $ban <nickname>'
},
'unban': {
'name': '$unban',
'help_message': 'Unban an user. They need to be invited afterwards. Requires the ban user permission.',
'usage': '$ban <username>'
},
'server_invite': {
'name': '$server_invite',
'help_message': 'Generate a link to invite people to this server.',
'usage': '$server_invite'
},
'add_bot': {
'name': '$add_bot',
'help_message': 'Generate a link to add this bot to a server you own.',
'usage': '$add_bot'
},
'broadcast': {
'name': '$broadcast',
'help_message': 'Send a message to all text channels you have write permission in.',
'usage': '$broadcast <text you want to broadcast>'
},
'dice': {
'name': '$dice',
'help_message': 'Roll a dice with a specified number of sides. The number should be 2 or more.',
'usage': '$dice <number>'
}
}
def command_exists(command):
return command.strip('$') in commands
async def get_command_help(command):
info = None
if command_exists(command.strip('$')):
info = commands[command.strip('$')]
return info
async def get_commands():
command_list = []
for command in commands:
command_list.append(commands[command]['name'])
return command_list