BUG-FIX: accepts commands with arguments

This commit is contained in:
Frederico @ VilaRosa02 2025-08-31 17:41:29 +00:00
parent d5bdf67ce5
commit e532ff5186

View File

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