Bug Fix: Telegram Social Bots sendMessage failing due to changes to Telegram package
This commit is contained in:
1 parent
bf6bb3559d
commit
dc6e1bdb1c
3 files changed
+2
-6
No files matched your search
@@ -22,7 +22,7 @@ exports.newFoundationsBotModulesTelegramBot = function (processIndex) {
|
||||
|
||||
thisObject.chatId = chatId
|
||||
|
||||
const Telegraf = SA.nodeModules.telegraf
|
||||
const { Telegraf } = SA.nodeModules.telegraf
|
||||
|
||||
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.'))
|
||||
@@ -41,9 +41,7 @@ exports.newFoundationsBotModulesTelegramBot = function (processIndex) {
|
||||
|
||||
thisObject.telegramBot.launch()
|
||||
|
||||
const Telegram = SA.nodeModules.telegram
|
||||
|
||||
thisObject.telegramAPI = new Telegram(botToken)
|
||||
thisObject.telegramAPI = thisObject.telegramBot.telegram
|
||||
|
||||
const message = "Telegram bot is starting. For assistance type /help."
|
||||
thisObject.telegramAPI.sendMessage(thisObject.chatId, message)
|
||||
|
||||
Reference in new issue
Block a user