me stoopid
This commit is contained in:
parent
b1b3e8a37f
commit
468491c6af
1 changed files with 4 additions and 4 deletions
|
@ -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"));
|
||||
|
|
Loading…
Reference in a new issue