Answer the question
In order to leave comments, you need to log in
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
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
Add that the "typing" status is issued, then it will look alive, and not like a freeze)
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 questionAsk a Question
731 491 924 answers to any question