We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ed9660 commit 1408ba1Copy full SHA for 1408ba1
src/Commands/Command.php
@@ -11,6 +11,7 @@
11
namespace Longman\TelegramBot\Commands;
12
13
use Longman\TelegramBot\DB;
14
+use Longman\TelegramBot\Request;
15
use Longman\TelegramBot\Telegram;
16
use Longman\TelegramBot\Entities\Chat;
17
use Longman\TelegramBot\Entities\Update;
@@ -126,10 +127,10 @@ public function setUpdate(Update $update = null)
126
127
*/
128
public function preExecute()
129
{
- if (!$this->need_mysql || ($this->telegram->isDbEnabled() && DB::isDbConnected())) {
130
- return $this->execute();
+ if ($this->need_mysql && !($this->telegram->isDbEnabled() && DB::isDbConnected())) {
131
+ return $this->executeNoDB();
132
}
- return $this->executeNoDB();
133
+ return $this->execute();
134
135
136
/**
0 commit comments