telegram-bot-sdk icon indicating copy to clipboard operation
telegram-bot-sdk copied to clipboard

TriggerCommand with parametr in Laravel 6.2

Open Atmden opened this issue 3 years ago • 0 comments

Hello! Help me solve the problem. I need to call the execution of a command inside the framework with a parameter passing. In version 2.0 this feature was available. In the new version, this is not possible.

public function webhookHandler()
    {
        $update = $this->telegram->commandsHandler(true);
        $message = $update->getMessage();
        Log::debug($message);
        Log::debug($update->detectType());
        if ($update->detectType() == 'callback_query') {
            $query = $update->getCallbackQuery();
            $data  = $query->getData();
            $chid = $query->getFrom()->getId();
            $this->telegram->triggerCommand('fmc',$update);
        }
     }

How can I pass a parameter to the FMС command?

Atmden avatar Mar 23 '21 09:03 Atmden