From 6855e0ddd686b4e1723398dc92753a1cd20d4fea Mon Sep 17 00:00:00 2001 From: Neko-Life Date: Fri, 20 Aug 2021 23:15:36 +0700 Subject: [PATCH] good splitMessage --- cmds/profile/avatar.js | 2 +- cmds/utility/lookup.js | 2 +- cmds/utility/mesemb.js | 2 +- cmds/utility/mesinfo.js | 2 +- cmds/utility/uinfo.js | 2 +- resources/functions.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmds/profile/avatar.js b/cmds/profile/avatar.js index 77e65d8..588e8fd 100644 --- a/cmds/profile/avatar.js +++ b/cmds/profile/avatar.js @@ -93,7 +93,7 @@ module.exports = class avatar extends commando.Command { for (let index = 0; index < allEmb.length; index++) { const embelement = allEmb[index]; const contelement = "" || multipleMemMes[index]; - retSent.push({ embed: embelement, content: contelement, split: { maxLength: 2000, char: ",", append: ',```', prepend: '```js' } }); + retSent.push({ embed: embelement, content: contelement, split: { maxLength: 2000, char: "", append: '```', prepend: '```js' } }); } return retSent.map(r => trySend(this.client, msg, r)); } diff --git a/cmds/utility/lookup.js b/cmds/utility/lookup.js index 8184f96..e9d08b5 100644 --- a/cmds/utility/lookup.js +++ b/cmds/utility/lookup.js @@ -100,7 +100,7 @@ module.exports = class lookup extends commando.Command { } } if (memMes.length > 0) { - return trySend(this.client, msg, { content: memMes, split: { char: ",", append: ",```", prepend: "```js", maxLength: 2000 } }); + return trySend(this.client, msg, { content: memMes, split: { char: "", append: "```", prepend: "```js", maxLength: 2000 } }); } } }; \ No newline at end of file diff --git a/cmds/utility/mesemb.js b/cmds/utility/mesemb.js index 0edadac..95e5839 100644 --- a/cmds/utility/mesemb.js +++ b/cmds/utility/mesemb.js @@ -19,6 +19,6 @@ module.exports = class mesemb extends commando.Command { return trySend(this.client, msg, "404 message not found!"); } const mesemb = '```js\n' + JSON.stringify(message.embeds, (k, v) => v || undefined, 2).replace(/```/g,"`\\``") + '```'; - return trySend(this.client, msg, { content: 'Collected:' + mesemb, split: { maxLength: 2000, char: ",", append: ',```', prepend:'```js\n' }}); + return trySend(this.client, msg, { content: 'Collected:' + mesemb, split: { maxLength: 2000, char: "", append: '```', prepend:'```js\n' }}); } }; \ No newline at end of file diff --git a/cmds/utility/mesinfo.js b/cmds/utility/mesinfo.js index dd70d00..41ebe83 100644 --- a/cmds/utility/mesinfo.js +++ b/cmds/utility/mesinfo.js @@ -23,6 +23,6 @@ module.exports = class mesinfo extends commando.Command { const sendMentionInfo = 'Mentions:```js\n'+JSON.stringify(mentionJSON, (k, v) => v || undefined, 2)+'```'; const Attachments = 'Attachments:```js\n'+JSON.stringify(message.attachments, (k, v) => v || undefined, 2)+'```'; const sendmesinfo = mesinfo+sendMentionInfo+Attachments; - return trySend(this.client, msg, {content:sendmesinfo,split:{ maxLength: 2000, char: ",",append: ',```', prepend: '```js\n' }}); + return trySend(this.client, msg, {content:sendmesinfo,split:{ maxLength: 2000, char: "",append: '```', prepend: '```js\n' }}); } }; \ No newline at end of file diff --git a/cmds/utility/uinfo.js b/cmds/utility/uinfo.js index d81550b..b2fc1bb 100644 --- a/cmds/utility/uinfo.js +++ b/cmds/utility/uinfo.js @@ -39,7 +39,7 @@ module.exports = class uinfo extends commando.Command { result += 'Display color:```js\n'+member.displayColor+'```'; } } - return trySend(this.client, msg, { content: result, split:{ maxLength: 2000, char: ",", append: ',```', prepend: '```js\n' }}); + return trySend(this.client, msg, { content: result, split:{ maxLength: 2000, char: "", append: '```', prepend: '```js\n' }}); } catch (e) { return trySend(this.client, msg, "404 ERROR not found~"); } diff --git a/resources/functions.js b/resources/functions.js index 28d2dfc..facdf16 100644 --- a/resources/functions.js +++ b/resources/functions.js @@ -546,7 +546,7 @@ function defaultDateFormat(date) { return ""; } -const defaultSplitMessage = { maxLength: 2000, char: ",", append: ',```', prepend: '```js\n' }; +const defaultSplitMessage = { maxLength: 2000, char: "", append: '```', prepend: '```js\n' }; /** * @param {object} oldObj