From d6e6244336ccdcdac9a06ab453debe76b13c9bde Mon Sep 17 00:00:00 2001 From: MarkusRost <37275477+Markus-Rost@users.noreply.github.com> Date: Wed, 18 Aug 2021 10:47:13 +0200 Subject: [PATCH] fix(Util): allow empty strings in splitMessage (#6437) --- src/util/Util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/Util.js b/src/util/Util.js index 930c19490b35..9e82f77c3837 100644 --- a/src/util/Util.js +++ b/src/util/Util.js @@ -70,7 +70,7 @@ class Util extends null { * @returns {string[]} */ static splitMessage(text, { maxLength = 2000, char = '\n', prepend = '', append = '' } = {}) { - text = Util.verifyString(text, RangeError, 'MESSAGE_CONTENT_TYPE', false); + text = Util.verifyString(text); if (text.length <= maxLength) return [text]; let splitText = [text]; if (Array.isArray(char)) {