This commit is contained in:
Ashley Graves 2024-10-16 00:35:16 +02:00
parent 2315b9cd98
commit 54a310fb3d

View file

@ -48,7 +48,8 @@ module.exports = {
const footerText = ([ const footerText = ([
result.filesize, result.filesize,
`${result.seed} S`, `${result.seed} S`,
`${result.leech} L` `${result.leech} L`,
result.publishedDate ? new Date(result.publishedDate).toLocaleDateString('en-us', { weekday: "long", year: "numeric", month: "short", day: "numeric" }) : ''
]).filter(notEmpty).join(" • "); ]).filter(notEmpty).join(" • ");
const site = result.parsed_url.slice(0, 2).join("://"); const site = result.parsed_url.slice(0, 2).join("://");
@ -71,8 +72,7 @@ module.exports = {
.setDescription(description) .setDescription(description)
.setFooter({ .setFooter({
text: footerText text: footerText
}) });
.setTimestamp(result.publishedDate ? new Date(result.publishedDate) : null);
embeds.push(embed); embeds.push(embed);
} }