require_once "vendor/autoload.php";
$bot = new \TelegramBot\Api\Client('API_TOKEN');
$bot->command('start', function ($message) use ($bot) {
$bot->sendMessage($message->getChat()->getId(), 'Добро пожаловать!');
});
$bot->run();
getUpdates()
You can use method getUpdates() and all incoming messages will be automatically tracked as Message-event