mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +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[]}
|
* @returns {string[]}
|
||||||
*/
|
*/
|
||||||
static splitMessage(text, { maxLength = 2000, char = '\n', prepend = '', append = '' } = {}) {
|
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];
|
if (text.length <= maxLength) return [text];
|
||||||
let splitText = [text];
|
let splitText = [text];
|
||||||
if (Array.isArray(char)) {
|
if (Array.isArray(char)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user