mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
19 lines
473 B
TypeScript
19 lines
473 B
TypeScript
import { Region } from '../../constants/regions';
|
|
import { getAccountInfo } from '../blitz/getAccountInfo';
|
|
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',
|
|
);
|
|
}
|