mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-13 04:36:12 +01:00
18 lines
426 B
TypeScript
18 lines
426 B
TypeScript
import { getAccountInfo, 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',
|
|
);
|
|
}
|