diff --git a/src/util/Util.js b/src/util/Util.js index 2f12d5870..f9aaf21c2 100644 --- a/src/util/Util.js +++ b/src/util/Util.js @@ -53,11 +53,11 @@ class Util { * Splits a string into multiple chunks at a designated character that do not exceed a specific length. * @param {StringResolvable} text Content to split * @param {SplitOptions} [options] Options controlling the behavior of the split - * @returns {string|string[]} + * @returns {string[]} */ static splitMessage(text, { maxLength = 2000, char = '\n', prepend = '', append = '' } = {}) { text = this.resolveString(text); - if (text.length <= maxLength) return text; + if (text.length <= maxLength) return [text]; const splitText = text.split(char); if (splitText.some(chunk => chunk.length > maxLength)) throw new RangeError('SPLIT_MAX_LEN'); const messages = [];