2023-10-14 10:52:05 -05:00
|
|
|
import { getAccountInfo } from '../../_core/blitz/getAccountInfo';
|
2023-10-11 18:26:35 -05:00
|
|
|
import { Region } from '../../constants/regions';
|
|
|
|
|
import linkButton from '../discord/linkButton';
|
|
|
|
|
|
2023-10-12 12:07:45 -05:00
|
|
|
export async function getBlitzStarsLinkButton(
|
|
|
|
|
region: Region,
|
|
|
|
|
id: number,
|
|
|
|
|
tankId?: number,
|
|
|
|
|
) {
|
2023-10-14 10:52:05 -05:00
|
|
|
const { nickname } = await getAccountInfo(region, id);
|
2023-10-11 18:26:35 -05:00
|
|
|
|
|
|
|
|
return linkButton(
|
2023-10-12 12:07:45 -05:00
|
|
|
`https://www.blitzstars.com/player/${region}/${nickname}${
|
|
|
|
|
tankId ? `/tank/${tankId!}` : ''
|
|
|
|
|
}`,
|
2023-10-11 18:26:35 -05:00
|
|
|
'BlitzStars',
|
|
|
|
|
);
|
|
|
|
|
}
|