Answer the question
In order to leave comments, you need to log in
Why is $bot->run(); used in telegram?
Actually, subject. After all, if I use the $bot->sendMessage or $bot->sendPhoto function, then everything works anyway. What function does $bot->run(); then perform?
And if it is necessary, then in the case when I have several teams in a row, put wounds after each or after the last team?
Update . I use https://github.com/TelegramBot/Api
Answer the question
In order to leave comments, you need to log in
You can look at the source code and find the run() method
/**
* Webhook handler
*
* @return array
* @throws \TelegramBot\Api\InvalidJsonException
*/
public function run()
{
if ($data = BotApi::jsonValidate($this->getRawBody(), true)) {
$this->handle([Update::fromResponse($data)]);
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question