Social-Bots Project
This commit is contained in:
1 parent
2df3a569b4
commit
780f975e7c
12 files changed
+123
-62
No files matched your search
+1
-1
@@ -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.newFoundationsBotModulesAnnouncements(processIndex)
|
||||
let announcementsModuleObject = TS.projects.foundations.botModules.announcements.newSocialBotsBotModulesAnnouncements(processIndex)
|
||||
|
||||
return thisObject
|
||||
|
||||
|
||||
+1
-1
@@ -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.newFoundationsBotModulesAnnouncements(processIndex)
|
||||
let announcementsModuleObject = TS.projects.foundations.botModules.announcements.newSocialBotsBotModulesAnnouncements(processIndex)
|
||||
let snapshotsModuleObject = TS.projects.algorithmicTrading.botModules.snapshots.newAlgorithmicTradingBotModulesSnapshots(processIndex)
|
||||
let tradingEpisodeModuleObject = TS.projects.algorithmicTrading.botModules.tradingEpisode.newAlgorithmicTradingBotModulesTradingEpisode(processIndex)
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
}
|
||||
|
||||
TS.projects.foundations.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).SOCIAL_BOTS_MODULE =
|
||||
TS.projects.foundations.botModules.socialBots.newFoundationsBotModulesSocialBots(processIndex)
|
||||
TS.projects.foundations.botModules.socialBots.newSocialBotsBotModulesSocialBots(processIndex)
|
||||
|
||||
return thisObject;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
}
|
||||
|
||||
TS.projects.foundations.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).SOCIAL_BOTS_MODULE =
|
||||
TS.projects.foundations.botModules.socialBots.newFoundationsBotModulesSocialBots(processIndex)
|
||||
TS.projects.foundations.botModules.socialBots.newSocialBotsBotModulesSocialBots(processIndex)
|
||||
|
||||
return thisObject;
|
||||
|
||||
|
||||
@@ -331,11 +331,6 @@
|
||||
"name": "Workspace Functions",
|
||||
"propertyName": "workspaceFunctions",
|
||||
"functionName": "newFoundationsFunctionLibraryWorkspaceFunctions"
|
||||
},
|
||||
{
|
||||
"name": "Social Bots Functions",
|
||||
"propertyName": "socialBotsFunctions",
|
||||
"functionName": "newFoundationsFunctionLibrarySocialBotsFunctions"
|
||||
}
|
||||
],
|
||||
"utilities": [
|
||||
@@ -739,50 +734,7 @@
|
||||
"fileName": "ProcessOutput.js"
|
||||
}
|
||||
],
|
||||
"botModules": [
|
||||
{
|
||||
"name": "Announcements",
|
||||
"propertyName": "announcements",
|
||||
"functionName": "newFoundationsBotModulesAnnouncements",
|
||||
"fileName": "Announcements.js",
|
||||
"folderName": "Trading-Bot/Announcements"
|
||||
},
|
||||
{
|
||||
"name": "Social Bots",
|
||||
"propertyName": "socialBots",
|
||||
"functionName": "newFoundationsBotModulesSocialBots",
|
||||
"fileName": "SocialBots.js",
|
||||
"folderName": "Trading-Bot/Announcements"
|
||||
},
|
||||
{
|
||||
"name": "Telegram Bot",
|
||||
"propertyName": "telegramBot",
|
||||
"functionName": "newFoundationsBotModulesTelegramBot",
|
||||
"fileName": "TelegramBot.js",
|
||||
"folderName": "Trading-Bot/Announcements"
|
||||
},
|
||||
{
|
||||
"name": "Discord Bot",
|
||||
"propertyName": "discordBot",
|
||||
"functionName": "newFoundationsBotModulesDiscordBot",
|
||||
"fileName": "DiscordBot.js",
|
||||
"folderName": "Trading-Bot/Announcements"
|
||||
},
|
||||
{
|
||||
"name": "Slack Bot",
|
||||
"propertyName": "slackBot",
|
||||
"functionName": "newFoundationsBotModulesSlackBot",
|
||||
"fileName": "SlackBot.js",
|
||||
"folderName": "Trading-Bot/Announcements"
|
||||
},
|
||||
{
|
||||
"name": "Twitter Bot",
|
||||
"propertyName": "twitterBot",
|
||||
"functionName": "newFoundationsBotModulesTwitterBot",
|
||||
"fileName": "TwitterBot.js",
|
||||
"folderName": "Trading-Bot/Announcements"
|
||||
}
|
||||
]
|
||||
"botModules": []
|
||||
},
|
||||
"PL": {
|
||||
"utilities": [
|
||||
@@ -1599,5 +1551,76 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Social-Bots",
|
||||
"propertyName": "socialBots",
|
||||
"UI": {
|
||||
"functionLibraries": [
|
||||
{
|
||||
"name": "Social Bots Functions",
|
||||
"propertyName": "socialBotsFunctions",
|
||||
"functionName": "newSocialBotsFunctionLibrarySocialBotsFunctions"
|
||||
}
|
||||
],
|
||||
"utilities": []
|
||||
},
|
||||
"TS": {
|
||||
"botModules": [
|
||||
{
|
||||
"name": "Announcements",
|
||||
"propertyName": "announcements",
|
||||
"functionName": "newSocialBotsBotModulesAnnouncements",
|
||||
"fileName": "Announcements.js",
|
||||
"folderName": ""
|
||||
},
|
||||
{
|
||||
"name": "Social Bots",
|
||||
"propertyName": "socialBots",
|
||||
"functionName": "newSocialBotsBotModulesSocialBots",
|
||||
"fileName": "SocialBots.js",
|
||||
"folderName": ""
|
||||
},
|
||||
{
|
||||
"name": "Telegram Bot",
|
||||
"propertyName": "telegramBot",
|
||||
"functionName": "newSocialBotsBotModulesTelegramBot",
|
||||
"fileName": "TelegramBot.js",
|
||||
"folderName": ""
|
||||
},
|
||||
{
|
||||
"name": "Discord Bot",
|
||||
"propertyName": "discordBot",
|
||||
"functionName": "newSocialBotsBotModulesDiscordBot",
|
||||
"fileName": "DiscordBot.js",
|
||||
"folderName": ""
|
||||
},
|
||||
{
|
||||
"name": "Slack Bot",
|
||||
"propertyName": "slackBot",
|
||||
"functionName": "newSocialBotsBotModulesSlackBot",
|
||||
"fileName": "SlackBot.js",
|
||||
"folderName": ""
|
||||
},
|
||||
{
|
||||
"name": "Twitter Bot",
|
||||
"propertyName": "twitterBot",
|
||||
"functionName": "newSocialBotsBotModulesTwitterBot",
|
||||
"fileName": "TwitterBot.js",
|
||||
"folderName": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Visual-Scripting",
|
||||
"propertyName": "visualScripting",
|
||||
"UI": {
|
||||
"functionLibraries": [],
|
||||
"utilities": []
|
||||
},
|
||||
"TS": {
|
||||
"botModules": []
|
||||
}
|
||||
}
|
||||
]
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
exports.newFoundationsBotModulesAnnouncements = function (processIndex) {
|
||||
exports.newSocialBotsBotModulesAnnouncements = function (processIndex) {
|
||||
|
||||
const MODULE_NAME = 'Announcements'
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
exports.newFoundationsBotModulesDiscordBot = function (processIndex) {
|
||||
exports.newSocialBotsBotModulesDiscordBot = function (processIndex) {
|
||||
|
||||
const MODULE_NAME = 'Discord Bot'
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
exports.newFoundationsBotModulesSlackBot = function (processIndex) {
|
||||
exports.newSocialBotsBotModulesSlackBot = function (processIndex) {
|
||||
|
||||
const MODULE_NAME = 'Slack Bot'
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
exports.newFoundationsBotModulesSocialBots = function (processIndex) {
|
||||
exports.newSocialBotsBotModulesSocialBots = function (processIndex) {
|
||||
|
||||
const MODULE_NAME = 'Social Bots'
|
||||
|
||||
@@ -19,13 +19,13 @@ exports.newFoundationsBotModulesSocialBots = function (processIndex) {
|
||||
let config = socialBot.config
|
||||
let commands = socialBot.socialBotCommand
|
||||
if (socialBot.type === "Telegram Bot") {
|
||||
socialBot.botInstance = TS.projects.foundations.botModules.telegramBot.newFoundationsBotModulesTelegramBot(processIndex)
|
||||
socialBot.botInstance = TS.projects.foundations.botModules.telegramBot.newSocialBotsBotModulesTelegramBot(processIndex)
|
||||
socialBot.botInstance.initialize(config, commands)
|
||||
} else if (socialBot.type === "Discord Bot") {
|
||||
socialBot.botInstance = TS.projects.foundations.botModules.discordBot.newFoundationsBotModulesDiscordBot(processIndex)
|
||||
socialBot.botInstance = TS.projects.foundations.botModules.discordBot.newSocialBotsBotModulesDiscordBot(processIndex)
|
||||
socialBot.botInstance.initialize(config)
|
||||
} else if (socialBot.type === "Slack Bot") {
|
||||
socialBot.botInstance = TS.projects.foundations.botModules.slackBot.newFoundationsBotModulesSlackBot(processIndex)
|
||||
socialBot.botInstance = TS.projects.foundations.botModules.slackBot.newSocialBotsBotModulesSlackBot(processIndex)
|
||||
socialBot.botInstance.initialize(config)
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
exports.newFoundationsBotModulesTelegramBot = function (processIndex) {
|
||||
exports.newSocialBotsBotModulesTelegramBot = function (processIndex) {
|
||||
|
||||
const MODULE_NAME = 'Telegram Bot'
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
function newSocialBotsActionSwitch() {
|
||||
|
||||
let thisObject = {
|
||||
executeAction: executeAction,
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
}
|
||||
|
||||
return thisObject
|
||||
|
||||
function finalize() {
|
||||
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
/* Nothing to initialize since a Function Library does not hold any state. */
|
||||
}
|
||||
|
||||
async function executeAction(action) {
|
||||
switch (action.name) {
|
||||
case 'Add All Output Datasets':
|
||||
{
|
||||
UI.projects.dataMining.functionLibraries.mineFunctions.addAllOutputDatasets(action.node)
|
||||
}
|
||||
break
|
||||
case 'Add All Data Dependencies':
|
||||
{
|
||||
UI.projects.dataMining.functionLibraries.mineFunctions.addAllDataDependencies(action.node)
|
||||
}
|
||||
break
|
||||
case 'Add All Data Mine Dependencies':
|
||||
{
|
||||
UI.projects.dataMining.functionLibraries.mineFunctions.addAllDataMineDataDependencies(action.node, action.rootNodes)
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
function newFoundationsFunctionLibrarySocialBotsFunctions() {
|
||||
function newSocialBotsFunctionLibrarySocialBotsFunctions() {
|
||||
let thisObject = {
|
||||
sendTelegramTestMessage: sendTelegramTestMessage,
|
||||
sendDiscordTestMessage: sendDiscordTestMessage,
|
||||
Reference in new issue
Block a user