Final FIX

This commit is contained in:
Neko Life 2021-05-11 15:06:51 +00:00
parent d43760a86f
commit 4df8b51463
5 changed files with 8 additions and 8 deletions

View file

@ -21,7 +21,7 @@ module.exports = class mydatabase extends commando.Command {
return errLog(e, msg, this.client); return errLog(e, msg, this.client);
} }
let mes = `Fetched documents for ${msg.guild ? `server **${msg.guild.name}**` : `**${msg.author.tag}**`}`; 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); trySend(this.client, msg, mes);
return ranLog(msg, "mydatabase", fetched); return ranLog(msg, "mydatabase", fetched);
}); });

View file

@ -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`; 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); return trySend(this.client, msg, resultMsg);
} }
}; };

View file

@ -17,7 +17,7 @@ module.exports = class mesemb extends commando.Command {
try { try {
const message = await getChannelMessage(this.client,msg,args[0],args[1]); const message = await getChannelMessage(this.client,msg,args[0],args[1]);
console.log(message.embeds); 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'}}); 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); return ranLog(msg,'mesemb',result.content);
} catch (e) { } catch (e) {

View file

@ -21,10 +21,10 @@ module.exports = class mesinfo extends commando.Command {
return trySend(this.client, msg, "No message with that ID <:catstareLife:794930503076675584>") return trySend(this.client, msg, "No message with that ID <:catstareLife:794930503076675584>")
} else { } else {
try { 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 mentionJSON = message.mentions.toJSON();
const sendMentionInfo = 'Mentions:```js\n'+JSON.stringify(mentionJSON, null, 4)+'```'; const sendMentionInfo = 'Mentions:```js\n'+JSON.stringify(mentionJSON, null, 2)+'```';
const Attachments = 'Attachments:```js\n'+JSON.stringify(message.attachments, null, 4)+'```'; const Attachments = 'Attachments:```js\n'+JSON.stringify(message.attachments, null, 2)+'```';
const sendmesinfo = mesinfo+sendMentionInfo+Attachments; const sendmesinfo = mesinfo+sendMentionInfo+Attachments;
const result1 = await trySend(this.client, msg, {content:sendmesinfo,split:{maxLength:2000,char: ", " || ",\n" || ". " || ".\n" || "," || ".",append:',```',prepend:'```js\n'}}); const result1 = await trySend(this.client, msg, {content:sendmesinfo,split:{maxLength:2000,char: ", " || ",\n" || ". " || ".\n" || "," || ".",append:',```',prepend:'```js\n'}});
return ranLog(msg,'mesinfo',`${result1}`); return ranLog(msg,'mesinfo',`${result1}`);

View file

@ -24,10 +24,10 @@ module.exports = class uinfo extends commando.Command {
const member = msg.guild.member(profile); const member = msg.guild.member(profile);
let result = 'User: '+profile.tag+'```js\n'; let result = 'User: '+profile.tag+'```js\n';
if (profile) { if (profile) {
result = result+JSON.stringify(profile, null, 4)+'```'; result = result+JSON.stringify(profile, null, 2)+'```';
} }
if (member) { 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)) { if ((member.displayColor)) {
result = result+'Display color:```js\n'+member.displayColor+'```'; result = result+'Display color:```js\n'+member.displayColor+'```';
} }