Skip to content

Commit

Permalink
Merge pull request #835 from Smidy13/develop
Browse files Browse the repository at this point in the history
Bug Fix: Close Stage Event not triggering / Improvement: Bot Using Commands and Greater Assistance
  • Loading branch information
Luis-Fernando-Molina authored Apr 24, 2021
2 parents cbfdf6c + ffa1b25 commit 25c3e2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ exports.newSuperalgosBotModulesTelegramBot = function (processIndex) {

thisObject.telegramBot = new Telegraf(botToken)
thisObject.telegramBot.start((ctx) => ctx.reply('Hi! I am the Telegram Bot that will tell you what happens with your trading session.'))
thisObject.telegramBot.help((ctx) => ctx.reply('I can stop the session if you type STOP.'))
thisObject.telegramBot.hears('STOP', (ctx) => TS.projects.superalgos.functionLibraries.sessionFunctions.stopSession(processIndex, ' by STOP command at Telegram.'))
thisObject.telegramBot.help((ctx) => ctx.replyWithHTML('<b><u>SUPERALGOS BOT HELP</u></b>\n\n• Use /stop to stop the session.\n• Use /help to receive this help message.'))
thisObject.telegramBot.command('stop', (ctx) => TS.projects.superalgos.functionLibraries.sessionFunctions.stopSession(processIndex, 'by command from Telegram.'))
thisObject.telegramBot.launch()

const Telegram = require('telegraf/telegram')

thisObject.telegramAPI = new Telegram(botToken)

const message = "Telegram bot is starting."
const message = "Telegram bot is starting. For assistance type /help."
thisObject.telegramAPI.sendMessage(thisObject.chatId, message).catch(err => parentLogger.write(MODULE_NAME, "[WARN] initializeTelegramBot -> Telegram API error -> err = " + err))

} catch (err) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ function newSuperalgosFunctionLibraryTradingSessionFunctions() {
'Manage Stage->' +
'Managed Stop Loss->Managed Take Profit->' +
'Phase->Formula->Next Phase Event->Move To Phase Event->Phase->' +
'Close Stage Event->' +
'Situation->Condition->Javascript Code->' +
'Close Stage->' +
'Initial Targets->Target Size In Base Asset->Target Size In Quoted Asset->Target Rate->Formula->' +
'Open Execution->Close Execution->' +
'Execution Algorithm->Market Buy Order->Market Sell Order->Limit Buy Order->Limit Sell Order->' +
'Order Rate->Formula->' +
'Create Order Event->Cancel Order Event->' +
'Close Stage Event->' +
'Announcement->Announcement Formula->Announcement Condition->' +
'Size In Base Asset->Size In Quoted Asset->Position Rate->Formula->' +
'Situation->Condition->Javascript Code->' +
Expand Down

0 comments on commit 25c3e2d

Please sign in to comment.