lookupinvite: fix no features error
This commit is contained in:
parent
8e7bd2a1d9
commit
83c0b226eb
1 changed files with 11 additions and 13 deletions
|
@ -121,20 +121,18 @@ lookupinvite.callback = async function (msg, line) {
|
||||||
|
|
||||||
if (invite.guild.features) {
|
if (invite.guild.features) {
|
||||||
const features = formatGuildFeatures(invite.guild.features);
|
const features = formatGuildFeatures(invite.guild.features);
|
||||||
embed.fields.push(
|
embed.fields.push({
|
||||||
{
|
name: `Features (${features.length})`,
|
||||||
name: `Features (${features.length})`,
|
value: features.length > 0 ? features.slice(0, Math.ceil(features.length / 2)).join("\n") : "None",
|
||||||
value: features.length > 0 ? features.slice(0, Math.ceil(features.length / 2)).join("\n") : "None",
|
inline: true,
|
||||||
|
});
|
||||||
|
if (features.length > 1) {
|
||||||
|
embed.fields.push({
|
||||||
|
name: "\u200b",
|
||||||
|
value: features.slice(Math.ceil(features.length / 2), features.length).join("\n"),
|
||||||
inline: true,
|
inline: true,
|
||||||
},
|
});
|
||||||
features.length > 1
|
}
|
||||||
? {
|
|
||||||
name: "\u200b",
|
|
||||||
value: features.slice(Math.ceil(features.length / 2), features.length).join("\n"),
|
|
||||||
inline: true,
|
|
||||||
}
|
|
||||||
: null
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const guildIcon = invite.guild?.icon && CDNEndpoints.GUILD_ICON(invite.guild.id, invite.guild.icon);
|
const guildIcon = invite.guild?.icon && CDNEndpoints.GUILD_ICON(invite.guild.id, invite.guild.icon);
|
||||||
|
|
Loading…
Reference in a new issue