add unknown server and unknown player and impl player embed
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m12s
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m12s
This commit is contained in:
23
src/common/embed-fallback.ts
Normal file
23
src/common/embed-fallback.ts
Normal file
@ -0,0 +1,23 @@
|
||||
import { Metadata } from "next";
|
||||
|
||||
type Fallback = {
|
||||
title: string;
|
||||
description: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Generates metadata for a fallback embed.
|
||||
*
|
||||
* @param title the title of the embed
|
||||
* @param description the description of the embed
|
||||
* @returns the metadata for the embed
|
||||
*/
|
||||
export function embedFallback({ title, description }: Fallback): Metadata {
|
||||
return {
|
||||
title: `${title}`,
|
||||
openGraph: {
|
||||
title: `${title}`,
|
||||
description: description,
|
||||
},
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user