Telegram bot trubles

php

#1

I wrote a bot on telegrams, which should work.
Bot returned the answer: {“ok”: true, “result”: true, “description”: “Webhook was set”}
Installed the library,
But the chat bot does not work. What could be the problem? Please help me.
The bot does not reply in the chat.

Below I wrote the code handler code for the bot.

include('vendor/autoload.php'); //Путь до файла-автозагрузчика библиотеки
use Telegram\Bot\Api;
$telegram = new Api('477148555:AAEeWjJ5duOC9b2mS7YI3t3JRN36_iu40Cs'); //токен в одинарных кавычках
$result = $telegram -> getWebhookUpdates();
$text = $result["message"]["text"];
$chat_id = $result["message"]["chat"]["id"];
$name = $result["message"]["from"]["username"];

if ($text == "/start") {
$reply = "Спасибо за подписку!";
$response = $telegram->sendMessage([ 'chat_id' => $chat_id, 'text' => $reply ]);

#2

Telegram bots are not allowed on Cloud9 as part of a blanket ban on bots operating on our hosted workspaces. If you would like to develop one, feel free to do so using an SSH workspace.