guildinfo: oop

This commit is contained in:
Cynthia Foxwell 2025-06-21 11:10:49 -06:00
parent 494e7dec0a
commit 709c0f1870
Signed by: Cynosphere
SSH key fingerprint: SHA256:H3SM8ufP/uxqLwKSH7xY89TDnbR9uOHzjLoBr0tlajk

View file

@ -101,9 +101,9 @@ guildinfo.callback = async function (msg, line, args, {nolocal, debug}) {
if (profile.search_terms) { if (profile.search_terms) {
traits = profile.search_terms.map((term) => `[\u2005${term}\u2005]`).join(" "); traits = profile.search_terms.map((term) => `[\u2005${term}\u2005]`).join(" ");
} else if (profile.traits) { } else if (profile.traits) {
traits = profile.traits.map( traits = profile.traits
(term) => `[\u2005${term.emoji_name ? `:${term.emoji_name}: ` : ""}${term.label}\u2005]` .map((term) => `[\u2005${term.emoji_name ? `:${term.emoji_name}: ` : ""}${term.label}\u2005]`)
); .join(" ");
} }
const gamesLeft = games.slice(0, Math.ceil(games.length / 2)).join("\n"); const gamesLeft = games.slice(0, Math.ceil(games.length / 2)).join("\n");