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