replyWithMessage(compact('text')); $this->replyWithChatAction(['action' => Actions::TYPING]); $telegram_user = \Telegram::getWebhookUpdates()['message']; // Log::info([$telegram_user]); // $text = sprintf('%s: %s'.PHP_EOL, 'Ваш номер чата', $telegram_user['from']['id']); if (isset($telegram_user['from']['username'])){ $text .= sprintf('%s: %s'.PHP_EOL, 'Ваше имя пользователя в телеграм', $telegram_user['from']['username']); } // Log::info($text); $this->replyWithMessage(compact('text')); $updateId = \Telegram::getWebhookUpdates()['update_id']+1; \Telegram::getWebhookUpdates(['offset'=>$updateId]); } }