Answer the question
In order to leave comments, you need to log in
Telegram bot api: Bot in PHP. How to send a message to the user (initiate communication)?
With nodejs everything is more or less clear, with PHP not quite.
If the user writes to the bot, then it is clear that you can immediately answer, but what if the answer is stretched in time?
Let's say some long-running operation (a request to a third-party API) should be performed.
That is, a situation where the answer is immediately impossible.
Implement a queue and parse it by crown? Or are there any other solutions?
Answer the question
In order to leave comments, you need to log in
The simplest version of cron, but then the responses are once a minute, which may not be very good.
But you can beat it beautifully, write something like "I think", "your request is very important to us")
The option is a little more complicated - redis
What is the difference in processing such messages compared to nodejs?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question