guildinfo: clan descriptor filtering, make search terms look nicer

This commit is contained in:
Cynthia Foxwell 2024-08-19 21:49:39 -06:00
parent a2ca461f7f
commit 8fa70aefa1

View file

@ -88,6 +88,8 @@ guildinfo.callback = async function (msg, line, args, {nolocal, debug}) {
})
);
clan.wildcard_descriptors = clan.wildcard_descriptors.filter((x) => x != "");
clanEmbed = {
title: _guild != null ? "Clan data" : clan.name,
description: clan.description ?? "*No description*",
@ -109,12 +111,14 @@ guildinfo.callback = async function (msg, line, args, {nolocal, debug}) {
},
clan.wildcard_descriptors.length > 0 && {
name: "Descriptors",
value: clan.wildcard_descriptors.join(", "),
value: `**${clan.wildcard_descriptors.join(", ")}**`,
inline: true,
},
clan.search_terms.length > 0 && {
name: "Interests/Topics/Traits",
value: `\`${clan.search_terms.map((x) => `"${x}"`).join(", ")}\``,
value: `${clan.search_terms
.map((term) => `\`\u2004${term.replaceAll(" ", "\u2009")}\u2004\``)
.join("\u2004")}`,
inline: false,
},
games.length > 0 && {