mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-10 03:06:11 +01:00
18 lines
429 B
TypeScript
18 lines
429 B
TypeScript
import { getAccountInfo, type Region } from "@blitzkit/core";
|
|
import { buttonLink } from "../discord/buttonLink";
|
|
|
|
export async function getBlitzStarsLinkButton(
|
|
region: Region,
|
|
id: number,
|
|
tankId?: number
|
|
) {
|
|
const { nickname } = await getAccountInfo(region, id);
|
|
|
|
return buttonLink(
|
|
`https://www.blitzstars.com/player/${region}/${nickname}${
|
|
tankId ? `/tank/${tankId!}` : ""
|
|
}`,
|
|
"BlitzStars"
|
|
);
|
|
}
|