COMMONS module introduced
This commit is contained in:
1 parent
a8da33e9e8
commit
73bc3d020e
8 files changed
+37
-16
No files matched your search
@@ -7,6 +7,7 @@
|
||||
const FULL_LOG = true;
|
||||
|
||||
let USER_BOT_MODULE;
|
||||
let COMMONS_MODULE;
|
||||
|
||||
const DEBUG_MODULE = require(ROOT_DIR + 'Debug Log');
|
||||
const logger = DEBUG_MODULE.newDebugLog();
|
||||
@@ -30,6 +31,12 @@
|
||||
|
||||
USER_BOT_MODULE = require(pBotPath + "/" + pProcessConfig.name + "/" + 'User.Bot');
|
||||
|
||||
try {
|
||||
COMMONS_MODULE = require(pBotPath + "/" + 'Commons');
|
||||
} catch (err) {
|
||||
// Nothing happens since COMMONS modules are optional.
|
||||
}
|
||||
|
||||
callBackFunction(global.DEFAULT_OK_RESPONSE);
|
||||
|
||||
} catch (err) {
|
||||
@@ -73,7 +80,7 @@
|
||||
|
||||
if (FULL_LOG === true) { logger.write("[INFO] run -> loop -> initializeUserBot -> Entering function."); }
|
||||
|
||||
usertBot = USER_BOT_MODULE.newUserBot(bot, UTILITIES, DEBUG_MODULE, FILE_STORAGE, STATUS_REPORT);
|
||||
usertBot = USER_BOT_MODULE.newUserBot(bot, COMMONS_MODULE, UTILITIES, DEBUG_MODULE, FILE_STORAGE, STATUS_REPORT);
|
||||
|
||||
usertBot.initialize(undefined, undefined, onInizialized);
|
||||
|
||||
|
||||
Reference in new issue
Block a user