Longman\TelegramBot\Commands\Command::preExecute PHP Method

preExecute() public method

Pre-execute command
public preExecute ( ) : ServerResponse
return Longman\TelegramBot\Entities\ServerResponse
    public function preExecute()
    {
        if ($this->need_mysql && !($this->telegram->isDbEnabled() && DB::isDbConnected())) {
            return $this->executeNoDb();
        }
        return $this->execute();
    }