guildinfo: hide empty clan fields

This commit is contained in:
Cynthia Foxwell 2024-08-13 15:18:09 -06:00
parent c7b3f34b4e
commit e917c985e2

View file

@ -107,17 +107,17 @@ guildinfo.callback = async function (msg, line, args, {nolocal, debug}) {
value: ClanPlaystyle[clan.playstyle] ?? `<unknown value: ${clan.playstyle}>`, value: ClanPlaystyle[clan.playstyle] ?? `<unknown value: ${clan.playstyle}>`,
inline: true, inline: true,
}, },
{ clan.wildcard_descriptors.length > 0 && {
name: "Descriptors", name: "Descriptors",
value: clan.wildcard_descriptors.join(", "), value: clan.wildcard_descriptors.join(", "),
inline: true, inline: true,
}, },
{ clan.search_terms.length > 0 && {
name: "Interests/Topics/Traits", name: "Interests/Topics/Traits",
value: `\`${clan.search_terms.map((x) => `"${x}"`).join(", ")}\``, value: `\`${clan.search_terms.map((x) => `"${x}"`).join(", ")}\``,
inline: false, inline: false,
}, },
{ games.length > 0 && {
name: "Associated Games", name: "Associated Games",
value: `- ${games.join("\n- ")}`, value: `- ${games.join("\n- ")}`,
inline: false, inline: false,