Don't spam the channel with "article content is too long"
This commit is contained in:
parent
9940e04431
commit
e2f36f65f4
|
@ -111,7 +111,7 @@ function formatPost(article) {
|
|||
let message = "";
|
||||
|
||||
if (article.title) message += `\n**${article.title}**`;
|
||||
if (article.content) message += article.content.length > Config.charLimit ? "\nArticle content too long for a single Discord message!" : `\n${article.content}`;
|
||||
if (article.content) message += article.content.length > Config.charLimit ? "" : `\n${article.content}`;
|
||||
if (article.link) message += `\n\n${normaliseUrlForDiscord(article.link)}`;
|
||||
|
||||
return message;
|
||||
|
@ -135,4 +135,4 @@ function normaliseYouTubeUrl(origUrl, parsedUrl) {
|
|||
|
||||
function normaliseUrlForCache(url) {
|
||||
return normaliseUrlForDiscord(url).replace(/^((https?:\/\/)?(www.)?)/, "");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue