protected function findChatCommand($cmdAndArgs, $depth, $orig = null)
    {
        if ($depth == 0) {
            return [null, []];
        }

        if ($orig == null) {
            $orig = $cmdAndArgs;
        }

        $cmdAndArgs = array_splice($cmdAndArgs, 0, $depth);
        $parameters = array_diff($orig, $cmdAndArgs);
        $command = implode(' ', $cmdAndArgs);

        return isset($this->commands[$command])
            ? [$this->commands[$command], $parameters]
            : $this->findChatCommand($cmdAndArgs, $depth - 1, $orig);
    }