mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix(Util): allow empty strings in splitMessage (#6437)
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user