From 51b70ea2f7827f88165cd94638fe52169c678e11 Mon Sep 17 00:00:00 2001 From: Neko Life Date: Thu, 27 May 2021 22:50:43 +0000 Subject: [PATCH] fix: split option no char --- cmds/utility/mesemb.js | 2 +- cmds/utility/mesinfo.js | 4 ++-- cmds/utility/uinfo.js | 20 +++++++++++--------- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/cmds/utility/mesemb.js b/cmds/utility/mesemb.js index 85d370a..6874f79 100644 --- a/cmds/utility/mesemb.js +++ b/cmds/utility/mesemb.js @@ -18,7 +18,7 @@ module.exports = class mesemb extends commando.Command { const message = await getChannelMessage(this.client,msg,args[0],args[1]); console.log(message.embeds); 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: ",",append:',```',prepend:'```js\n'}}); return ranLog(msg,'mesemb',result.content); } catch (e) { noPerm(msg); diff --git a/cmds/utility/mesinfo.js b/cmds/utility/mesinfo.js index 306a828..fd6514b 100644 --- a/cmds/utility/mesinfo.js +++ b/cmds/utility/mesinfo.js @@ -26,11 +26,11 @@ module.exports = class mesinfo extends commando.Command { 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'}}); + const result1 = await trySend(this.client, msg, {content:sendmesinfo,split:{maxLength:2000,char: ",",append:',```',prepend:'```js\n'}}); return ranLog(msg,'mesinfo',`${result1}`); } catch (e) { noPerm(msg); - return errLog(e, msg, this.client, false, "", false, defaultErrorLogChannel); + return errLog(e, msg, this.client); } } } diff --git a/cmds/utility/uinfo.js b/cmds/utility/uinfo.js index 73658a6..8cdae84 100644 --- a/cmds/utility/uinfo.js +++ b/cmds/utility/uinfo.js @@ -14,12 +14,14 @@ module.exports = class uinfo extends commando.Command { } async run(msg, arg) { try { - let profile, - hmm; + let profile; if (arg.length > 0) { - hmm = cleanMentionID(arg); + const hmm = cleanMentionID(arg); if (/^\d{17,19}$/.test(hmm)) { profile = this.client.users.cache.get(hmm); + if (!profile) { + profile = await this.client.users.fetch(hmm); + } } else { profile = findMemberRegEx(msg, hmm)[0].user; } @@ -27,20 +29,20 @@ module.exports = class uinfo extends commando.Command { profile = msg.author; } const member = msg.guild.member(profile); - let result = 'User: '+profile.tag+'```js\n'; + let result = ""; if (profile) { - result = result+JSON.stringify(profile, null, 2)+'```'; + result += 'User: '+profile.tag+'```js\n' + JSON.stringify(profile, null, 2)+'```'; } if (member) { - result = result+'As member: '+member.displayName+'```js\n'+JSON.stringify(member, null, 2)+'```'; + result += 'As member: '+member.displayName+'```js\n'+JSON.stringify(member, null, 2)+'```'; if ((member.displayColor)) { - result = result+'Display color:```js\n'+member.displayColor+'```'; + result += 'Display color:```js\n'+member.displayColor+'```'; } } - trySend(this.client, msg, result, {split:{maxLength:2000,char: ", " || ",\n" || ". " || ".\n" || "," || ".",append:',```',prepend:'```js\n'}}); + trySend(this.client, msg, result, {split:{maxLength:2000,char: ",",append:',```',prepend:'```js\n'}}); return ranLog(msg,'profile', msg.content); } catch (e) { - return trySend(this.client, msg, "Ya lookin for ya lover? 404 not found."); + return trySend(this.client, msg, "404 ERROR not found~"); } } }; \ No newline at end of file