-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.py
More file actions
52 lines (47 loc) · 1.48 KB
/
Copy pathfunctions.py
File metadata and controls
52 lines (47 loc) · 1.48 KB
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
import utils.db_utils as db_utils
import configparser
functions = {
# general use
'help': ['find out what are the functions you can access now',
0, 0,0 ,0 ,1
],
'start': ['starts a conversation with the bot',
1, 0, 0 ,0 ,0
],
'cancel': ['cancels currently using job or function',
0, 0 ,0 ,0, 0, 1
],
'end': ['ends the conversation menu',
0, 1, 1 ,1, 0, 1
],
'quit': ['quits all menus and returns to start menu',
0, 0, 1, 1, 0, 1
],
# for start menu
'admin_menu': ['enters the admin menu (only for people with admin perms)',
0, 1, 0, 0, 0, 0, 5
],
'new_thread': ['write a new thread to be posted in the group!',
0, 1, 0, 0, 0, 0],
'feedback': ['write a feedback to the admins',
0, 1, 0, 0, 0, 0
],
# for admin menu
'sview_fb': ['Feedback Summary View',
0, 0, 1, 0, 0, 0],
'dview_fb': ['<feedback id> Feedback Detailed View',
0, 0, 1, 0, 0, 0
],
}
if __name__ == '__main__':
testing = True
config = configparser.ConfigParser()
config.read('bot.cfg')
if testing:
bot_config = dict(config['test_bot'])
print(str(config))
dbi = db_utils.Database(config, 'test_db')
else:
bot_config = config['live_bot']
dbi = db_utils.Database(config, 'live_db')
dbi.write_fns_table(functions)