fix server embed
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 56s

This commit is contained in:
Lee
2024-04-17 17:41:55 +01:00
parent 31accee7f7
commit 77d03e79e9
2 changed files with 8 additions and 1 deletions

View File

@ -16,6 +16,7 @@ type Params = {
export async function generateMetadata({ params: { id } }: Params): Promise<Metadata> {
try {
// No id provided
if (!id || id.length === 0) {
return generateEmbed({
title: "Player Lookup",
@ -35,6 +36,7 @@ export async function generateMetadata({ params: { id } }: Params): Promise<Meta
image: headPartUrl,
});
} catch (err) {
// An error occurred
return generateEmbed({
title: "Player Not Found",
description: (err as McUtilsAPIError).message,