guildinfo: split the list
This commit is contained in:
parent
cd46617113
commit
0d5895e06a
1 changed files with 14 additions and 14 deletions
|
@ -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 && {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue