From e532ff518627ea91aee73558a4ff79a179e8d9f3 Mon Sep 17 00:00:00 2001 From: "Frederico @ VilaRosa02" Date: Sun, 31 Aug 2025 17:41:29 +0000 Subject: [PATCH] BUG-FIX: accepts commands with arguments --- router.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); }