Answer the question
In order to leave comments, you need to log in
The VK bot answers only one person if they write at the same time, what should I do?
I wrote a primitive bot in python and ran into the problem that the bot only answers one person if they write at the same time and this often happens. How can I implement all this so that the bot answers and does not let anyone through, because if they write to one at the same time, it will answer, and the other will not even read and answer until you write a message again.
Answer the question
In order to leave comments, you need to log in
Your algorithm is something like this:
Message received -> message processing [ Taking time... waiting for function to execute... ]
Another message has arrived - the bot is still busy processing the first one, so it won't even receive it.
Message received -> start asynchronous message processing function [ Processing is not expected to complete, message update continues immediately ]
We are psychics, we know your code ... But seriously, then throw off the code
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question