public function setPattern($pattern)
    {
        if (!\Erebot\Utils::stringifiable($pattern)) {
            throw new \Erebot\InvalidValueException('Pattern must be a string');
        }

        $this->pattern = $pattern;
    }