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)
|
||||
|
||||
@@ -40,7 +40,6 @@ SA.nodeModules = {
|
||||
ws: require('ws'),
|
||||
ip: require('ip'),
|
||||
telegraf: require('telegraf'),
|
||||
telegram: require('telegram'),
|
||||
https: require('https'),
|
||||
http: require('http'),
|
||||
web3: require('web3'),
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
"path": "^0.12.7",
|
||||
"simple-git": "^2.45.1",
|
||||
"telegraf": "^4.4.2",
|
||||
"telegram": "^1.8.14",
|
||||
"util": "^0.12.4",
|
||||
"web3": "^1.5.2",
|
||||
"ws": "^8.2.1"
|
||||
|
||||
Reference in new issue
Block a user