From db6b6603af004de8e632f42e2a8ee216face977a Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 10 Oct 2021 11:35:09 +0200 Subject: [PATCH] Refactoring project name --- .../Low-Frequency-Trading/TradingOrders.js | 2 +- .../Low-Frequency-Trading/TradingStages.js | 2 +- .../TS/Bot-Modules/Trading-Bot/TradingSession.js | 2 +- .../TS/Bot-Modules/Learning-Bot/LearningSession.js | 2 +- Projects/Social-Bots/TS/Bot-Modules/SocialBots.js | 11 +++++++---- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingOrders.js b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingOrders.js index 4558064e4..693af35df 100644 --- a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingOrders.js +++ b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingOrders.js @@ -17,7 +17,7 @@ exports.newAlgorithmicTradingBotModulesTradingOrders = function (processIndex) { let sessionParameters let exchangeAPIModuleObject = TS.projects.algorithmicTrading.botModules.exchangeAPI.newAlgorithmicTradingBotModulesExchangeAPI(processIndex) - let announcementsModuleObject = TS.projects.foundations.botModules.announcements.newSocialBotsBotModulesAnnouncements(processIndex) + let announcementsModuleObject = TS.projects.socialBots.botModules.announcements.newSocialBotsBotModulesAnnouncements(processIndex) return thisObject diff --git a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingStages.js b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingStages.js index 31458fe13..180cd85bb 100644 --- a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingStages.js +++ b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingStages.js @@ -24,7 +24,7 @@ exports.newAlgorithmicTradingBotModulesTradingStages = function (processIndex) { let tradingStrategyModuleObject = TS.projects.algorithmicTrading.botModules.tradingStrategy.newAlgorithmicTradingBotModulesTradingStrategy(processIndex) let tradingPositionModuleObject = TS.projects.algorithmicTrading.botModules.tradingPosition.newAlgorithmicTradingBotModulesTradingPosition(processIndex) let tradingExecutionModuleObject = TS.projects.algorithmicTrading.botModules.tradingExecution.newAlgorithmicTradingBotModulesTradingExecution(processIndex) - let announcementsModuleObject = TS.projects.foundations.botModules.announcements.newSocialBotsBotModulesAnnouncements(processIndex) + let announcementsModuleObject = TS.projects.socialBots.botModules.announcements.newSocialBotsBotModulesAnnouncements(processIndex) let snapshotsModuleObject = TS.projects.algorithmicTrading.botModules.snapshots.newAlgorithmicTradingBotModulesSnapshots(processIndex) let tradingEpisodeModuleObject = TS.projects.algorithmicTrading.botModules.tradingEpisode.newAlgorithmicTradingBotModulesTradingEpisode(processIndex) diff --git a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/TradingSession.js b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/TradingSession.js index 081e044bb..7fca5136c 100644 --- a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/TradingSession.js +++ b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/TradingSession.js @@ -7,7 +7,7 @@ } TS.projects.foundations.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).SOCIAL_BOTS_MODULE = - TS.projects.foundations.botModules.socialBots.newSocialBotsBotModulesSocialBots(processIndex) + TS.projects.socialBots.botModules.socialBots.newSocialBotsBotModulesSocialBots(processIndex) return thisObject; diff --git a/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/LearningSession.js b/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/LearningSession.js index 3831288b2..58df9554f 100644 --- a/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/LearningSession.js +++ b/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/LearningSession.js @@ -7,7 +7,7 @@ } TS.projects.foundations.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).SOCIAL_BOTS_MODULE = - TS.projects.foundations.botModules.socialBots.newSocialBotsBotModulesSocialBots(processIndex) + TS.projects.socialBots.botModules.socialBots.newSocialBotsBotModulesSocialBots(processIndex) return thisObject; diff --git a/Projects/Social-Bots/TS/Bot-Modules/SocialBots.js b/Projects/Social-Bots/TS/Bot-Modules/SocialBots.js index 3dbbb07a6..4efb56d44 100644 --- a/Projects/Social-Bots/TS/Bot-Modules/SocialBots.js +++ b/Projects/Social-Bots/TS/Bot-Modules/SocialBots.js @@ -19,13 +19,16 @@ exports.newSocialBotsBotModulesSocialBots = function (processIndex) { let config = socialBot.config let commands = socialBot.socialBotCommand if (socialBot.type === "Telegram Bot") { - socialBot.botInstance = TS.projects.foundations.botModules.telegramBot.newSocialBotsBotModulesTelegramBot(processIndex) + socialBot.botInstance = TS.projects.socialBots.botModules.telegramBot.newSocialBotsBotModulesTelegramBot(processIndex) socialBot.botInstance.initialize(config, commands) } else if (socialBot.type === "Discord Bot") { - socialBot.botInstance = TS.projects.foundations.botModules.discordBot.newSocialBotsBotModulesDiscordBot(processIndex) + socialBot.botInstance = TS.projects.socialBots.botModules.discordBot.newSocialBotsBotModulesDiscordBot(processIndex) socialBot.botInstance.initialize(config) } else if (socialBot.type === "Slack Bot") { - socialBot.botInstance = TS.projects.foundations.botModules.slackBot.newSocialBotsBotModulesSlackBot(processIndex) + socialBot.botInstance = TS.projects.socialBots.botModules.slackBot.newSocialBotsBotModulesSlackBot(processIndex) + socialBot.botInstance.initialize(config) + } else if (socialBot.type === "Twitter Bot") { + socialBot.botInstance = TS.projects.socialBots.botModules.slackBot.newSocialBotsBotModulesTwitterBot(processIndex) socialBot.botInstance.initialize(config) } } @@ -41,7 +44,7 @@ exports.newSocialBotsBotModulesSocialBots = function (processIndex) { try { if (socialBot.type === "Telegram Bot") { socialBot.botInstance.telegramAPI.sendMessage(socialBot.botInstance.chatId, text).catch(err => TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME, "[WARN] initialize -> initializeSocialBots -> announce -> Telegram API error -> err = " + err)) - } else if (socialBot.type === "Discord Bot" ||socialBot.type === "Slack Bot" ) { + } else if (socialBot.type === "Discord Bot" || socialBot.type === "Slack Bot") { socialBot.botInstance.sendMessage(text).catch(err => TS.projects.foundations.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).BOT_MAIN_LOOP_LOGGER_MODULE_OBJECT.write(MODULE_NAME, "[WARN] initialize -> initializeSocialBots -> announce -> Discord Bot error -> err = " + err)) } } catch (err) {