const Agent = require('socks5-https-client/lib/Agent')
const TelegramBot = require('node-telegram-bot-api')
bot = new TelegramBot(config.tg.token, {
polling: true,
request: {
agentClass: Agent,
agentOptions: config.connection.proxy, // it works normal
},
});
let lastUpdate = bot._polling._lastUpdate
setInterval(() => {
if (lastUpdate === bot._polling._lastUpdate) {
// watch bot don't detects web torn
console.error(`polling stopped, last update: ${lastUpdate}`)
process.exit(1)
}
lastUpdate = bot._polling._lastUpdate
}, 25000)
How to reproduce:
my bot initializing:
detect bug
telegramPolling._getUpdatesexecuted, but_polling: ._getUpdates() .then (telegramPolling:103)don't