$bot->on ( function($Update) use ($bot) { $message = $Update->getMessage(); $input = $message->getText(); $cid = $message->getChat()->getId(); $int_rand = rand(0, 9); $bot->sendMessage($cid, "test new" . $int_rand . $input, null, TRUE, null, null); }, function($message) use ($bot) { return true; } ); $bot->run();