mirror of
https://github.com/danbulant/Shasha
synced 2026-05-19 03:58:38 +00:00
good splitMessage
This commit is contained in:
parent
11be097c24
commit
6855e0ddd6
6 changed files with 6 additions and 6 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 } });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -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' }});
|
||||
}
|
||||
};
|
||||
|
|
@ -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' }});
|
||||
}
|
||||
};
|
||||
|
|
@ -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~");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -546,7 +546,7 @@ function defaultDateFormat(date) {
|
|||
return "<t:" + (Math.floor(use / 1000)) + ":F>";
|
||||
}
|
||||
|
||||
const defaultSplitMessage = { maxLength: 2000, char: ",", append: ',```', prepend: '```js\n' };
|
||||
const defaultSplitMessage = { maxLength: 2000, char: "", append: '```', prepend: '```js\n' };
|
||||
|
||||
/**
|
||||
* @param {object} oldObj
|
||||
|
|
|
|||
Loading…
Reference in a new issue