From 4df8b514639fdd620db1e522ab5870c8da13d75d Mon Sep 17 00:00:00 2001 From: Neko Life Date: Tue, 11 May 2021 15:06:51 +0000 Subject: [PATCH] Final FIX --- cmds/experiment/mydatabase.js | 2 +- cmds/moderation/mute.js | 2 +- cmds/utility/mesemb.js | 2 +- cmds/utility/mesinfo.js | 6 +++--- cmds/utility/uinfo.js | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmds/experiment/mydatabase.js b/cmds/experiment/mydatabase.js index 7ba728e..9874bb7 100644 --- a/cmds/experiment/mydatabase.js +++ b/cmds/experiment/mydatabase.js @@ -21,7 +21,7 @@ module.exports = class mydatabase extends commando.Command { return errLog(e, msg, this.client); } let mes = `Fetched documents for ${msg.guild ? `server **${msg.guild.name}**` : `**${msg.author.tag}**`}`; - mes = `${mes}\`\`\`js\n${JSON.stringify(fetched, null, 4)}\`\`\``; + mes = `${mes}\`\`\`js\n${JSON.stringify(fetched, null, 2)}\`\`\``; trySend(this.client, msg, mes); return ranLog(msg, "mydatabase", fetched); }); diff --git a/cmds/moderation/mute.js b/cmds/moderation/mute.js index b82c21c..fcb4fa0 100644 --- a/cmds/moderation/mute.js +++ b/cmds/moderation/mute.js @@ -140,7 +140,7 @@ module.exports = class mute extends commando.Command { } } resultMsg += `Result:\`\`\`js\nUsers: ${targetUser.map(r => r?.tag).join(", ")}\nReason: ${reason}\nAt: ${invokedAt.toUTCString()}\nFor: ${timeForMessage === "Indefinite" ? timeForMessage : timeForMessage.join(" + ")}\nUntil: ${typeof untilDate !== "string" ? untilDate.toUTCString() : untilDate}\`\`\`\n`; - trySend(this.client, msg, JSON.stringify(infractionToDoc, null, 4)); + trySend(this.client, msg, "```js\n" + JSON.stringify(infractionToDoc, null, 2) + "```"); return trySend(this.client, msg, resultMsg); } }; diff --git a/cmds/utility/mesemb.js b/cmds/utility/mesemb.js index c928ee6..85d370a 100644 --- a/cmds/utility/mesemb.js +++ b/cmds/utility/mesemb.js @@ -17,7 +17,7 @@ module.exports = class mesemb extends commando.Command { try { const message = await getChannelMessage(this.client,msg,args[0],args[1]); console.log(message.embeds); - const mesemb = '```js\n'+JSON.stringify(message.embeds, null, 4)+'```'; + const mesemb = '```js\n'+JSON.stringify(message.embeds, null, 2)+'```'; const result = await trySend(this.client, msg, {content:'Collected:'+mesemb,split:{maxLength:2000,char: ", " || ",\n" || ". " || ".\n" || "," || ".",append:',```',prepend:'```js\n'}}); return ranLog(msg,'mesemb',result.content); } catch (e) { diff --git a/cmds/utility/mesinfo.js b/cmds/utility/mesinfo.js index f79593b..306a828 100644 --- a/cmds/utility/mesinfo.js +++ b/cmds/utility/mesinfo.js @@ -21,10 +21,10 @@ module.exports = class mesinfo extends commando.Command { return trySend(this.client, msg, "No message with that ID <:catstareLife:794930503076675584>") } else { try { - const mesinfo = 'Collected:```js\n'+JSON.stringify(message, null, 4).replace(/`/g,"\\`")+'```'; + const mesinfo = 'Collected:```js\n'+JSON.stringify(message, null, 2).replace(/`/g,"\\`")+'```'; const mentionJSON = message.mentions.toJSON(); - const sendMentionInfo = 'Mentions:```js\n'+JSON.stringify(mentionJSON, null, 4)+'```'; - const Attachments = 'Attachments:```js\n'+JSON.stringify(message.attachments, null, 4)+'```'; + const sendMentionInfo = 'Mentions:```js\n'+JSON.stringify(mentionJSON, null, 2)+'```'; + const Attachments = 'Attachments:```js\n'+JSON.stringify(message.attachments, null, 2)+'```'; const sendmesinfo = mesinfo+sendMentionInfo+Attachments; const result1 = await trySend(this.client, msg, {content:sendmesinfo,split:{maxLength:2000,char: ", " || ",\n" || ". " || ".\n" || "," || ".",append:',```',prepend:'```js\n'}}); return ranLog(msg,'mesinfo',`${result1}`); diff --git a/cmds/utility/uinfo.js b/cmds/utility/uinfo.js index a123cd9..02b5834 100644 --- a/cmds/utility/uinfo.js +++ b/cmds/utility/uinfo.js @@ -24,10 +24,10 @@ module.exports = class uinfo extends commando.Command { const member = msg.guild.member(profile); let result = 'User: '+profile.tag+'```js\n'; if (profile) { - result = result+JSON.stringify(profile, null, 4)+'```'; + result = result+JSON.stringify(profile, null, 2)+'```'; } if (member) { - result = result+'As member: '+member.displayName+'```js\n'+JSON.stringify(member, null, 4)+'```'; + result = result+'As member: '+member.displayName+'```js\n'+JSON.stringify(member, null, 2)+'```'; if ((member.displayColor)) { result = result+'Display color:```js\n'+member.displayColor+'```'; }