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}>`,
inline: true,
},
{
clan.wildcard_descriptors.length > 0 && {
name: "Descriptors",
value: clan.wildcard_descriptors.join(", "),
inline: true,
},
{
clan.search_terms.length > 0 && {
name: "Interests/Topics/Traits",
value: `\`${clan.search_terms.map((x) => `"${x}"`).join(", ")}\``,
inline: false,
},
{
games.length > 0 && {
name: "Associated Games",
value: `- ${games.join("\n- ")}`,
inline: false,