utility.linvite: fix feature list

This commit is contained in:
Cynthia Foxwell 2023-09-14 23:18:01 -06:00
parent b8c2b6766b
commit fdd712a237

View file

@ -551,8 +551,7 @@ lookupinvite.callback = async function (msg, line) {
} }
: null; : null;
const features = invite.guild.features const features = invite.guild.features.map(
.map(
(feature) => (feature) =>
(GUILD_FEATURES[feature]?.icon ?? "\u2753") + (GUILD_FEATURES[feature]?.icon ?? "\u2753") +
" " + " " +
@ -561,8 +560,7 @@ lookupinvite.callback = async function (msg, line) {
.split("_") .split("_")
.map((x) => x[0] + x.substring(1).toLowerCase()) .map((x) => x[0] + x.substring(1).toLowerCase())
.join(" ")) .join(" "))
) );
.join(", ");
if (invite.type == 0) { if (invite.type == 0) {
embed.fields.push( embed.fields.push(
@ -609,17 +607,16 @@ lookupinvite.callback = async function (msg, line) {
name: "Features", name: "Features",
value: value:
features.length > 0 features.length > 0
? features.slice(0, Math.floor(features.length / 2)) ? features.slice(0, Math.floor(features.length / 2)).join("\n")
: "None", : "None",
inline: true, inline: true,
}, },
features.length > 1 features.length > 1
? { ? {
name: "\u200b", name: "\u200b",
value: features.slice( value: features
Math.floor(features.length / 2), .slice(Math.floor(features.length / 2), features.length)
features.length .join("\n"),
),
inline: true, inline: true,
} }
: null, : null,