-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
28 lines (27 loc) · 950 Bytes
/
index.js
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
(function () {
'use strict';
}());
const
logger = require('./logger'),
configureLogger = logger.configureLogger,
utils = require('./utils'),
format = utils.format,
Config = require('./config'),
config = new Config(format('%s/config.json', __dirname)),
sitemap = new Config(format('%s/sitemap.json', __dirname)),
dictionary = new Config(format('%s/dictionary_%s.json', __dirname, config.language)),
WitAi = require('./witai'),
Bot = require('./bot'),
FbMe = require('./fbme'),
Lookup = require('./lookup'),
OpenHab = require('./openhab'),
autorestart = require('./autorestart'),
registerRestartHook = autorestart.registerRestartHook;
configureLogger(config.logFile);
const fbMe = new FbMe(config);
const lookup = new Lookup(config, sitemap);
const openHab = new OpenHab(config);
const witAi = new WitAi(config);
const bot = new Bot(config, dictionary, fbMe, witAi, openHab, lookup);
bot.start();
registerRestartHook();