diff --git a/src/modules/utility.js b/src/modules/utility.js index e802932..b3bf6e6 100644 --- a/src/modules/utility.js +++ b/src/modules/utility.js @@ -1674,7 +1674,7 @@ appinfo.callback = async function (msg, line) { if (left.length < 1024 && right.length < 1024) { embed.fields.push({ - name: "Assets", + name: `Assets (${assets.length})`, value: left, inline: true, }); @@ -1685,17 +1685,26 @@ appinfo.callback = async function (msg, line) { inline: true, }); } else { - embed.fields.push({ - name: "Assets", - value: assets - .map((asset) => - asset.name.length > 32 - ? asset.name.substring(0, 31) + "\u2026" - : asset.name - ) - .join(", "), - inline: false, - }); + const assetList = assets + .map((asset) => + asset.name.length > 32 + ? asset.name.substring(0, 31) + "\u2026" + : asset.name + ) + .join(", "); + if (assetList.length < 1024) { + embed.fields.push({ + name: `Assets (${assets.length})`, + value: assetList, + inline: false, + }); + } else { + embed.fields.push({ + name: `Assets (${assets.length})`, + value: "*Exceeds 1024 characters.*", + inline: false, + }); + } } }