mirror of
https://github.com/danbulant/Shasha
synced 2026-05-24 12:22:00 +00:00
fix: split option no char
This commit is contained in:
parent
8dd4dcff52
commit
51b70ea2f7
3 changed files with 14 additions and 12 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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~");
|
||||
}
|
||||
}
|
||||
};
|
||||
Loading…
Reference in a new issue