I would like to ask how to convert the object received from the API Telegram. Below is my attempt:
$Image = []; for ($i=0; $i < 100; $i++) { $photo = new \TelegramBot\Api\Types\Inline\QueryResult\Photo($i,'http://site.ru/telegram/image/'.$i.'.jpg', 'http://site.ru/telegram/thumbinals/1.jpg'); (array) $photo; $Image = $photo[$i]; } var_dump((array)$Image); $result = $bot->answerInlineQuery($qid, $Image, 100, false);