From 0d5895e06a02c3e716c360ebe06c801db813ae06 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Sat, 21 Jun 2025 11:04:01 -0600 Subject: [PATCH] guildinfo: split the list --- src/modules/utility/guildinfo.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/modules/utility/guildinfo.js b/src/modules/utility/guildinfo.js index 1e0233c..41cfc06 100644 --- a/src/modules/utility/guildinfo.js +++ b/src/modules/utility/guildinfo.js @@ -88,7 +88,9 @@ guildinfo.callback = async function (msg, line, args, {nolocal, debug}) { game = await hf.bot.requestHandler.request("GET", APIEndpoints.APPLICATION_RPC(id), false); } - return `${game.name}${profile.game_activity[id]?.activity_level > 1 ? " :fire:" : ""}\n-# \u200b\u3000${id}`; + return `${game.name}${ + profile.game_activity[id]?.activity_level > 1 ? " \ud83d\udd25" : "" + }\n-# \u200b\u3000${id}`; }) ); @@ -126,15 +128,8 @@ guildinfo.callback = async function (msg, line, args, {nolocal, debug}) { } } - let gameLines = ""; - let gameLines2 = ""; - for (const line of games) { - if (gameLines.length + line.length + 1 <= 1024) { - gameLines += line + "\n"; - } else { - gameLines2 += line + "\n"; - } - } + const gamesLeft = games.slice(0, Math.ceil(games.length / 2)).join("\n"); + const gamesRight = games.slice(Math.ceil(games.length / 2), games.length).join("\n"); clanEmbed = { color: profile.brand_color_primary ? parseInt(profile.brand_color_primary.replace("#", "0x")) : 0, @@ -161,12 +156,17 @@ guildinfo.callback = async function (msg, line, args, {nolocal, debug}) { }, games.length > 0 && { name: "Associated Games", - value: gameLines, - inline: false, + value: gamesLeft, + inline: true, }, - gameLines2 != "" && { + gamesRight != "" && { name: "\u200b", - value: gameLines2, + value: gamesRight, + inline: true, + }, + games.length > 0 && { + name: "\u200b", + value: "\u200b", inline: false, }, profile.badge_color_primary && {