BUG-FIX: accepts commands with arguments
This commit is contained in:
parent
d5bdf67ce5
commit
e532ff5186
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user