update server embed
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m4s

This commit is contained in:
Lee 2024-04-18 08:59:13 +01:00
parent 21e1a0e596
commit f61e46cb27

@ -56,7 +56,7 @@ function checkPlatform(platform: ServerPlatform): boolean {
export async function generateViewport({ params: { platform, hostname } }: Params): Promise<Viewport> {
const validPlayer = await isValidServer(platform, hostname);
return {
themeColor: validPlayer ? Colors.green : Colors.red,
themeColor: validPlayer || !platform ? Colors.green : Colors.red,
};
}
@ -82,12 +82,11 @@ export async function generateMetadata({ params: { platform, hostname } }: Param
const favicon = getFavicon(platform, server);
let description = `Hostname: ${serverHostname}\n`;
description += `${players.online}/${players.max} players online\n\n`;
let description = `${players.online}/${players.max} players connected!\n\n`;
description += "Click to view more information about the server.";
return generateEmbed({
title: `${hostname}`,
title: `${capitalizeFirstLetter(platform)} Server: ${serverHostname}`,
description: description,
image: favicon,
});