update server embed
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m4s
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m4s
This commit is contained in:
parent
21e1a0e596
commit
f61e46cb27
@ -56,7 +56,7 @@ function checkPlatform(platform: ServerPlatform): boolean {
|
|||||||
export async function generateViewport({ params: { platform, hostname } }: Params): Promise<Viewport> {
|
export async function generateViewport({ params: { platform, hostname } }: Params): Promise<Viewport> {
|
||||||
const validPlayer = await isValidServer(platform, hostname);
|
const validPlayer = await isValidServer(platform, hostname);
|
||||||
return {
|
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);
|
const favicon = getFavicon(platform, server);
|
||||||
|
|
||||||
let description = `Hostname: ${serverHostname}\n`;
|
let description = `${players.online}/${players.max} players connected!\n\n`;
|
||||||
description += `${players.online}/${players.max} players online\n\n`;
|
|
||||||
description += "Click to view more information about the server.";
|
description += "Click to view more information about the server.";
|
||||||
|
|
||||||
return generateEmbed({
|
return generateEmbed({
|
||||||
title: `${hostname}`,
|
title: `${capitalizeFirstLetter(platform)} Server: ${serverHostname}`,
|
||||||
description: description,
|
description: description,
|
||||||
image: favicon,
|
image: favicon,
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user