diff --git a/src/TgBotLib/PollingBot.php b/src/TgBotLib/PollingBot.php index f3e93fc..6632a46 100644 --- a/src/TgBotLib/PollingBot.php +++ b/src/TgBotLib/PollingBot.php @@ -235,14 +235,19 @@ { // Check if the update contains a command $command = $update?->getAnyMessage()?->getCommand(); + $commandExecuted = false; if ($command !== null) { foreach ($this->getEventHandlersByCommand($command) as $commandHandler) { (new $commandHandler($update))->handle($this); + $commandExecuted = true; } - continue; + if($commandExecuted) + { + continue; + } } // Check if the update contains a callback query