From 8749d03f1de9bba0f4e1a903b5427cebc1052fdd Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Wed, 8 Jan 2020 09:54:19 +0100 Subject: [PATCH] Update SendLargeMessages.plugin.js --- Plugins/SendLargeMessages/SendLargeMessages.plugin.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Plugins/SendLargeMessages/SendLargeMessages.plugin.js b/Plugins/SendLargeMessages/SendLargeMessages.plugin.js index 20b061e1ad..ab3091b29b 100644 --- a/Plugins/SendLargeMessages/SendLargeMessages.plugin.js +++ b/Plugins/SendLargeMessages/SendLargeMessages.plugin.js @@ -3,7 +3,7 @@ class SendLargeMessages { getName () {return "SendLargeMessages";} - getVersion () {return "1.6.2";} + getVersion () {return "1.6.3";} getAuthor () {return "DevilBro";} @@ -84,9 +84,10 @@ class SendLargeMessages { processChannelTextAreaForm (e) { if (!BDFDB.ModuleUtils.isPatched(this, e.instance, "handleSendMessage")) BDFDB.ModuleUtils.patch(this, e.instance, "handleSendMessage", {instead: e2 => { - if (e2.methodArguments[0] > BDFDB.DiscordConstants.MAX_MESSAGE_LENGTH) { + if (e2.methodArguments[0].length > BDFDB.DiscordConstants.MAX_MESSAGE_LENGTH) { e2.stopOriginalMethodCall(); let messages = this.formatText(e2.methodArguments[0]); + console.log(messages); messages.filter(n => n).forEach((message, i) => { BDFDB.TimeUtils.timeout(_ => { e2.originalMethod(message);