Библиотека для упрощенной разработки ботов Telegram.
$ git clone https://github.com/bitnooob/TelegramLib.git$bot = new \telegram\bot\Bot('token');require_once 'autoload.php';
$bot = new \telegram\bot\Bot('token');
$longpoll = $bot->getLongPoll();
while (true) {
$update = $longpoll->getUpdates();
if (empty($update))
continue;
foreach ($update as $data) {
$message = $data['message'];
$from = $message['from'];
$text = $message['text'];
$user_id = $from['id'];
$user = $bot->getUser($user_id);
$user->sendMessage('hello');
}
}