I have implemented execute commands with parameters within the ‘getUpdates’ function as shown below:
public function fetchUpdates() {
$handler = Telegram::commandsHandler(true);
if (stripos($telegram['text'], 'REF') !== false) {
$params = array(
'ID' => $telegram['text']
);
Telegram::getCommandBus()->run('partner', $params, $handler);
exit();
}
}
However, when I include parameters, the execution fails, while it works perfectly without them. What could be the cause of this issue? How can I correctly pass parameters to execute a command?