D
D
Dmitry2018-12-05 20:36:34
Bots
Dmitry, 2018-12-05 20:36:34

Telegram bot gives an error?

Hello, I am making a telegram bot and it gives an error when running on node.js.
The JS code itself:

const TelegramBot = require('node-telegram-bot-api');
const token = '762233114:AAFbAhRpMgOVH1nbF3EXVDyqp8Nya6zXhiU';

const bot = new TelegramBot(token, {
  polling: true
});

bot.on('message', (msg) => {
  console.log(msg)
}) // прослушка на событие

Error in console:
error: [polling_error] {"code":"EFATAL","message":"EFATAL: Error: read ECONNRESET"}

There are two questions:
1. An error due to telegram blocking in Russia?
2. If so, how to get around? I know that you can connect a proxy to the bot, but I don't know how. Is there any documentation?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry, 2018-12-05
@refreak

In short, put a VPN on your computer (not on a browser) and everything will be chiki farts;)

E
Eugene, 2019-03-20
@toohappy

On Windows 10, you can create a VPN.

M
Mr-Quiet, 2021-11-30
@Mr-Quiet

Can be run through Tor proxy
Here is a link from where I found the info

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question