diff --git a/.vs/AACloudPlatform/v15/.suo b/.vs/AACloudPlatform/v15/.suo index d83ca723f..c6ac4af2e 100644 Binary files a/.vs/AACloudPlatform/v15/.suo and b/.vs/AACloudPlatform/v15/.suo differ diff --git a/AACloudPlatform.njsproj b/AACloudPlatform.njsproj index ac6426347..d38aaf60f 100644 --- a/AACloudPlatform.njsproj +++ b/AACloudPlatform.njsproj @@ -23,6 +23,9 @@ + + Code + diff --git a/Debug Log.js b/Debug Log.js index 3bb9f0afc..e88bbaf80 100644 --- a/Debug Log.js +++ b/Debug Log.js @@ -1,8 +1,4 @@ - - - -exports.newDebugLog = function newDebugLog() { - +exports.newDebugLog = function newDebugLog() { const MODULE_NAME = "Debug Log"; const fileSystem = require('fs'); @@ -16,38 +12,35 @@ exports.newDebugLog = function newDebugLog() { let firstCall = true; let folderPath; - debugLog = { + thisObject = { bot: undefined, fileName: undefined, write: write }; - - - return debugLog; - + return thisObject; function createFolders() { try { - folderPath = debugLog.bot.devTeam; + folderPath = thisObject.bot.devTeam; createFolderSync(folderPath); - folderPath = debugLog.bot.devTeam + "/" + debugLog.bot.type; + folderPath = thisObject.bot.devTeam + "/" + thisObject.bot.type; createFolderSync(folderPath); - folderPath = debugLog.bot.devTeam + "/" + debugLog.bot.type + "/" + debugLog.bot.name; + folderPath = thisObject.bot.devTeam + "/" + thisObject.bot.type + "/" + thisObject.bot.name; createFolderSync(folderPath); - folderPath = debugLog.bot.devTeam + "/" + debugLog.bot.type + "/" + debugLog.bot.name + "/" + debugLog.bot.version; + folderPath = thisObject.bot.devTeam + "/" + thisObject.bot.type + "/" + thisObject.bot.name + "/" + thisObject.bot.version; createFolderSync(folderPath); - folderPath = debugLog.bot.devTeam + "/" + debugLog.bot.type + "/" + debugLog.bot.name + "/" + debugLog.bot.version + "/" + debugLog.bot.process; + folderPath = thisObject.bot.devTeam + "/" + thisObject.bot.type + "/" + thisObject.bot.name + "/" + thisObject.bot.version + "/" + thisObject.bot.process; createFolderSync(folderPath); @@ -61,7 +54,6 @@ exports.newDebugLog = function newDebugLog() { } - function write(Message) { if (firstCall === true) { @@ -87,7 +79,6 @@ exports.newDebugLog = function newDebugLog() { } } - function createFolderSync(name) { try { fileSystem.mkdirSync( './logs/' + name) diff --git a/ExchangeAPI.js b/ExchangeAPI.js new file mode 100644 index 000000000..b78e74df9 --- /dev/null +++ b/ExchangeAPI.js @@ -0,0 +1,14 @@ +exports.newExchangeAPI = function newExchangeAPI() { + + const MODULE_NAME = "Exchange API"; + + thisObject = { + bot: undefined, + fileName: undefined, + write: write + }; + + return thisObject; + + +}; \ No newline at end of file diff --git a/Run.js b/Run.js index a937982d8..f606a0b46 100644 --- a/Run.js +++ b/Run.js @@ -32,10 +32,10 @@ catch (err) { } let bot = { - "name": botConfig.bot.displayName, - "type": botConfig.bot.type, - "version": botConfig.bot.version, - "devTeam": botConfig.bot.devTeam + "name": botConfig.displayName, + "type": botConfig.type, + "version": botConfig.version, + "devTeam": botConfig.devTeam }; botConfig.bot;