From 6e46d613a418aa6b752df78b9dc51acae126551c Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 18 Apr 2024 09:03:06 +0100 Subject: [PATCH] format player count on server embed --- src/app/(pages)/server/[platform]/[[...hostname]]/page.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/(pages)/server/[platform]/[[...hostname]]/page.tsx b/src/app/(pages)/server/[platform]/[[...hostname]]/page.tsx index de4004e..f25bf5c 100644 --- a/src/app/(pages)/server/[platform]/[[...hostname]]/page.tsx +++ b/src/app/(pages)/server/[platform]/[[...hostname]]/page.tsx @@ -5,6 +5,7 @@ import { ServerView } from "@/app/components/server/server-view"; import { ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuTrigger } from "@/app/components/ui/context-menu"; import { Colors } from "@/common/colors"; import { generateEmbed } from "@/common/embed"; +import { formatNumber } from "@/common/number-utils"; import { isValidServer } from "@/common/server"; import { capitalizeFirstLetter } from "@/common/string-utils"; import config from "@root/config.json"; @@ -82,7 +83,7 @@ export async function generateMetadata({ params: { platform, hostname } }: Param const favicon = getFavicon(platform, server); - let description = `There is ${players.online}/${players.max} players connected!\n\n`; + let description = `There is ${formatNumber(players.online)}/${formatNumber(players.max)} players connected!\n\n`; description += "Click to view more information about the server."; return generateEmbed({