This commit is contained in:
Ashley Graves 2024-10-12 01:11:09 +02:00
parent 61c8a8de01
commit 45160d8df8

View file

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