diff --git a/router.php b/router.php index 95a31c9..1d6ca0f 100644 --- a/router.php +++ b/router.php @@ -23,6 +23,7 @@ if ($argc > 1 && $argv[1] == "--print-json-command-list") { // 2. PROCESS COMMAND extract(json_decode(file_get_contents('php://stdin'),1)["message"]); // from, chat, date, text -if (isset($commands[$text])) { - $commands[$text]["callback"]($from, $chat, $date, $text); +$submitted_cmd = explode(" ",$text)[0]; +if (isset($commands[$submitted_cmd])) { + $commands[$submitted_cmd]["callback"]($from, $chat, $date, $text); }