This commit is contained in:
Ashley Graves 2024-10-16 01:26:41 +02:00
parent c1cefcc22b
commit e20e7d74c6

View file

@ -26,6 +26,10 @@ function notEmpty(str) {
return str && str.trim() !== '' return str && str.trim() !== ''
} }
function shorten(str) {
return str.length <= 20 ? str : str.slice(0, 17) + "...";
}
const emojis = JSON.parse(readFileSync("config/emojis.json")); const emojis = JSON.parse(readFileSync("config/emojis.json"));
module.exports = { module.exports = {
@ -61,7 +65,7 @@ module.exports = {
result.magnetlink, result.magnetlink,
result.torrentfile, result.torrentfile,
result.url result.url
].filter(notEmpty).join("\n• "); ].filter(notEmpty).map(shorten).join("\n• ");
const embed = new EmbedBuilder() const embed = new EmbedBuilder()
.setAuthor({ .setAuthor({