I
I
Igor2020-04-28 11:43:02
Node.js
Igor, 2020-04-28 11:43:02

Do I need polling or webhook for this TG bot?

Hello. The situation is as follows: there is a need for a bot (it will be described in index.js) that will simply respond to user messages and sometimes, depending on the message, send an http request and give an already formatted response. That's all. For the bot I use node.js api .
The main criterion is that after the launch of the bot (node ​​index.js) it should last as long as possible. That is, users will send messages, the bot will send http requests, give something to users - and all this should spin for weeks in this one process.
So, in the process, I noticed in this node.js api such a thing as polling and web hooks.
Question: do I need to implement the main criterion for my polling botor webhook? And what is it for?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Shumov, 2020-04-28
Mnimyy @Yittton

Take what you like. Webhook - messages are sent to the http address, polling - you connect to the telegram council and receive the same messages. Just different ways to use

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question