diff --git a/src/TgBotLib/PollingBot.php b/src/TgBotLib/PollingBot.php index e9c0f28..df35eab 100644 --- a/src/TgBotLib/PollingBot.php +++ b/src/TgBotLib/PollingBot.php @@ -240,13 +240,10 @@ $commandHandlers = $this->getEventHandlersByCommand($command); foreach ($commandHandlers as $commandHandler) { - /** @var CommandEvent $commandHandler */ - if ($commandHandler::getCommand() === $command) - { - (new $commandHandler($update))->handle($this); - continue 2; - } + (new $commandHandler($update))->handle($this); } + + continue; } // Check if the update contains a callback query