guildinfo: fix long games in clans
This commit is contained in:
parent
767d4256cf
commit
00c2d8f2a3
1 changed files with 16 additions and 1 deletions
|
@ -114,6 +114,16 @@ guildinfo.callback = async function (msg, line, args, {nolocal, debug}) {
|
||||||
if (index == clan.search_terms.length - 1) termLines.push(currentTerm);
|
if (index == clan.search_terms.length - 1) termLines.push(currentTerm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let gameLines = "";
|
||||||
|
let gameLines2 = "";
|
||||||
|
for (const line of games) {
|
||||||
|
if (gameLines.length + line.length + 1 <= 1024) {
|
||||||
|
gameLines += line + "\n";
|
||||||
|
} else {
|
||||||
|
gameLines2 += line + "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
clanEmbed = {
|
clanEmbed = {
|
||||||
color: parseInt(clan.brand_color_primary.replace("#", "0x")),
|
color: parseInt(clan.brand_color_primary.replace("#", "0x")),
|
||||||
title: _guild == null ? clan.name : null,
|
title: _guild == null ? clan.name : null,
|
||||||
|
@ -136,7 +146,12 @@ guildinfo.callback = async function (msg, line, args, {nolocal, debug}) {
|
||||||
},
|
},
|
||||||
games.length > 0 && {
|
games.length > 0 && {
|
||||||
name: "Associated Games",
|
name: "Associated Games",
|
||||||
value: `${games.join("\n")}`,
|
value: gameLines,
|
||||||
|
inline: false,
|
||||||
|
},
|
||||||
|
gameLines2 != "" && {
|
||||||
|
name: "\u200b",
|
||||||
|
value: gameLines,
|
||||||
inline: false,
|
inline: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue