diff --git a/apps/discord-bot/src/commands/bedwars/bedwars.profile.tsx b/apps/discord-bot/src/commands/bedwars/bedwars.profile.tsx index 452699499..ba92c73a9 100644 --- a/apps/discord-bot/src/commands/bedwars/bedwars.profile.tsx +++ b/apps/discord-bot/src/commands/bedwars/bedwars.profile.tsx @@ -6,17 +6,44 @@ * https://github.com/Statsify/statsify/blob/main/LICENSE */ -import { BedWarsModes, FormattedGame, type GameMode } from "@statsify/schemas"; +import { BedWarsMode, BedWarsModes, FormattedGame, type GameMode } from "@statsify/schemas"; import { Container, Footer, Header, Historical, SidebarItem, + StatColumn, Table, formatProgression, } from "#components"; import type { BaseProfileProps } from "#commands/base.hypixel-command"; +import type { LocalizeFunction } from "@statsify/discord"; + +export function getBedWarsTable(stats: BedWarsMode, t: LocalizeFunction): StatColumn[][] { + return [ + [ + { title: t("stats.wins"), color: "§a", value: stats.wins }, + { title: t("stats.losses"), color: "§c", value: stats.losses, lowerIsBetter: true }, + { title: t("stats.wlr"), color: "§6", value: stats.wlr }, + ], + [ + { title: t("stats.finalKills"), color: "§a", value: stats.finalKills }, + { title: t("stats.finalDeaths"), color: "§c", value: stats.finalDeaths, lowerIsBetter: true }, + { title: t("stats.fkdr"), color: "§6", value: stats.fkdr }, + ], + [ + { title: t("stats.kills"), color: "§a", value: stats.kills }, + { title: t("stats.deaths"), color: "§c", value: stats.deaths, lowerIsBetter: true }, + { title: t("stats.kdr"), color: "§6", value: stats.kdr }, + ], + [ + { title: t("stats.bedsBroken"), color: "§a", value: stats.bedsBroken }, + { title: t("stats.bedsLost"), color: "§c", value: stats.bedsLost, lowerIsBetter: true }, + { title: t("stats.bblr"), color: "§6", value: stats.bblr }, + ], + ]; +} export interface BedWarsProfileProps extends BaseProfileProps { mode: GameMode; @@ -71,47 +98,24 @@ export const BedWarsProfile = ({ time={time} /> - - - - - - - - - - - - - - - - - - - - - + {[ + ...getBedWarsTable(stats, t).map((row) => ( + + {row.map((col) => ( + + ))} + + )), + , + ]}