utility.linvite: fix feature list
This commit is contained in:
parent
b8c2b6766b
commit
fdd712a237
1 changed files with 14 additions and 17 deletions
|
@ -551,18 +551,16 @@ 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") +
|
" " +
|
||||||
" " +
|
(GUILD_FEATURES[feature]?.name ??
|
||||||
(GUILD_FEATURES[feature]?.name ??
|
feature
|
||||||
feature
|
.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,
|
||||||
|
|
Loading…
Reference in a new issue