D
D
Dvorak2016-09-08 22:18:03
Node.js
Dvorak, 2016-09-08 22:18:03

Why such a delay when sending a message from a telegram bot?

Hello. I am writing a telegram bot using node.js. A few minutes after development, I sometimes noticed a huge delay in sending messages (5-6 seconds each). I thought it was due to incorrect work with the database. But in the end, I wrote an elementary bot in 5 lines, which sends the last message to the user, and still there is such a delay
, what could be the problem?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
nllm, 2016-09-08
@nllm

Work via webhook?
Measure the script execution time at each step, including before receiving a response from the telegram server when sending a message. Understand what is the reason

I
Ivan, 2016-09-10
@trak_ivan

Add that the "typing" status is issued, then it will look alive, and not like a freeze)

A
Anton Anton, 2017-02-06
@Fragster

I used telegraph, there were no delays (it all depended on the speed of the Internet on a mobile device)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question