Skip to content

Commit

Permalink
feat(bot): more compact roster layout
Browse files Browse the repository at this point in the history
  • Loading branch information
shayypy committed Mar 7, 2024
1 parent 850a9b0 commit 86fe27e
Showing 1 changed file with 40 additions and 31 deletions.
71 changes: 40 additions & 31 deletions packages/bot/src/cron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -772,45 +772,54 @@ export const getHtLineupEmbed = (
})
.setColor(getTeamColor(league, game.home.id))
.addFields(
// TODO sort this by position
{
name: `${getTeamEmoji(league, game.visitor.id)} ${
game.visitor.nickname
}`,
value: [
"**Forwards**",
...lines.visitor.f.map(
(player) => `#${player.jersey_number} ${player.last_name}`,
),
"\n**Defense**",
...lines.visitor.d.map(
(player) => `#${player.jersey_number} ${player.last_name}`,
),
"\n**Goalie**",
...lines.visitor.g.map(
(player) => `#${player.jersey_number} ${player.last_name}`,
),
]
}\nForwards`,
value: lines.visitor.f
.map((player) => `#${player.jersey_number} ${player.last_name}`)
.join("\n")
.slice(0, 1024),
inline: true,
},
{
name: `${getTeamEmoji(league, game.home.id)} ${game.home.nickname}`,
value: [
"**Forwards**",
...lines.home.f.map(
(player) => `#${player.jersey_number} ${player.last_name}`,
),
"\n**Defense**",
...lines.home.d.map(
(player) => `#${player.jersey_number} ${player.last_name}`,
),
"\n**Goalie**",
...lines.home.g.map(
(player) => `#${player.jersey_number} ${player.last_name}`,
),
]
name: "_ _\nDefense",
value: lines.visitor.d
.map((player) => `#${player.jersey_number} ${player.last_name}`)
.join("\n")
.slice(0, 1024),
inline: true,
},
{
name: "_ _\nGoalie",
value: lines.visitor.g
.map((player) => `#${player.jersey_number} ${player.last_name}`)
.join("\n")
.slice(0, 1024),
inline: true,
},
{
name: `${getTeamEmoji(league, game.home.id)} ${
game.home.nickname
}\nForwards`,
value: lines.home.f
.map((player) => `#${player.jersey_number} ${player.last_name}`)
.join("\n")
.slice(0, 1024),
inline: true,
},
{
name: "_ _\nDefense",
value: lines.home.d
.map((player) => `#${player.jersey_number} ${player.last_name}`)
.join("\n")
.slice(0, 1024),
inline: true,
},
{
name: "_ _\nGoalie",
value: lines.home.g
.map((player) => `#${player.jersey_number} ${player.last_name}`)
.join("\n")
.slice(0, 1024),
inline: true,
Expand Down

0 comments on commit 86fe27e

Please sign in to comment.