mirror of
https://github.com/danbulant/discord.js
synced 2026-06-16 05:01:18 +00:00
fix: Util#splitMessage when destructured (#3456)
This commit is contained in:
parent
0a2003095d
commit
5d95a4b264
1 changed files with 1 additions and 1 deletions
|
|
@ -56,7 +56,7 @@ class Util {
|
|||
* @returns {string[]}
|
||||
*/
|
||||
static splitMessage(text, { maxLength = 2000, char = '\n', prepend = '', append = '' } = {}) {
|
||||
text = this.resolveString(text);
|
||||
text = Util.resolveString(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');
|
||||
|
|
|
|||
Loading…
Reference in a new issue