Closed aqilhex closed 3 years ago
I get this error connect ETIMEDOUT 149.154.167.220:443 each time my ip changed and bot stop working! It's pooling related.
connect ETIMEDOUT 149.154.167.220:443
This is my code process.env.NTBA_FIX_319 = 1; const TelegramBot = require('node-telegram-bot-api'); const bot = new TelegramBot(token, {polling: true}); bot.on("polling_error", (err) => console.log(err)); bot.on('message', (msg) => { bot.sendMessage(msg.chat.id, 'Alive... '); });
process.env.NTBA_FIX_319 = 1; const TelegramBot = require('node-telegram-bot-api'); const bot = new TelegramBot(token, {polling: true}); bot.on("polling_error", (err) => console.log(err)); bot.on('message', (msg) => { bot.sendMessage(msg.chat.id, 'Alive... '); });
Removing polling and adding this line of code bot.setWebHook(${url}/bot${TOKEN}); saved me.
bot.setWebHook(
);
I get this error
connect ETIMEDOUT 149.154.167.220:443
each time my ip changed and bot stop working! It's pooling related.This is my code
process.env.NTBA_FIX_319 = 1; const TelegramBot = require('node-telegram-bot-api'); const bot = new TelegramBot(token, {polling: true}); bot.on("polling_error", (err) => console.log(err)); bot.on('message', (msg) => { bot.sendMessage(msg.chat.id, 'Alive... '); });