me stoopid

This commit is contained in:
Ashley Graves 2024-10-12 01:14:47 +02:00
parent b1b3e8a37f
commit 468491c6af

View file

@ -53,16 +53,16 @@ function notEmpty(str) {
return str.trim() !== ''
}
const regexCutTags = /[\S\s]{1,475}[^,]{0,25}/;
const regexCutTags = /[\S\s]{1,875}[^,]{0,25}/;
function formatTags(tags) {
const tagString = decode(tags.join(', '));
if (tagString.length < 500) {
return tagString;
if (tagString.length < 900) {
return escapeMarkdown(tagString);
}
const tagCutMatch = tagString.match(regexCutTags) ?? [];
return `\`\`${(tagCutMatch[0] ?? '')}, ...\`\``;
return `${escapeMarkdown(tagCutMatch[0] ?? '')}, ...`;
}
var credentials = JSON.parse(readFileSync("config/credentials.json"));