good splitMessage

This commit is contained in:
Neko-Life 2021-08-20 23:15:36 +07:00
parent 11be097c24
commit 6855e0ddd6
6 changed files with 6 additions and 6 deletions

View file

@ -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));
}

View file

@ -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 } });
}
}
};

View file

@ -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' }});
}
};

View file

@ -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' }});
}
};

View file

@ -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~");
}

View file

@ -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