From fdd712a237391d34fbd8d02d339e9a1a76888779 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Thu, 14 Sep 2023 23:18:01 -0600 Subject: [PATCH] utility.linvite: fix feature list --- src/modules/utility.js | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/src/modules/utility.js b/src/modules/utility.js index 52ddec1..d0a797c 100644 --- a/src/modules/utility.js +++ b/src/modules/utility.js @@ -551,18 +551,16 @@ lookupinvite.callback = async function (msg, line) { } : null; - const features = invite.guild.features - .map( - (feature) => - (GUILD_FEATURES[feature]?.icon ?? "\u2753") + - " " + - (GUILD_FEATURES[feature]?.name ?? - feature - .split("_") - .map((x) => x[0] + x.substring(1).toLowerCase()) - .join(" ")) - ) - .join(", "); + const features = invite.guild.features.map( + (feature) => + (GUILD_FEATURES[feature]?.icon ?? "\u2753") + + " " + + (GUILD_FEATURES[feature]?.name ?? + feature + .split("_") + .map((x) => x[0] + x.substring(1).toLowerCase()) + .join(" ")) + ); if (invite.type == 0) { embed.fields.push( @@ -609,17 +607,16 @@ lookupinvite.callback = async function (msg, line) { name: "Features", value: features.length > 0 - ? features.slice(0, Math.floor(features.length / 2)) + ? features.slice(0, Math.floor(features.length / 2)).join("\n") : "None", inline: true, }, features.length > 1 ? { name: "\u200b", - value: features.slice( - Math.floor(features.length / 2), - features.length - ), + value: features + .slice(Math.floor(features.length / 2), features.length) + .join("\n"), inline: true, } : null,