mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: core chunk 2
This commit is contained in:
1 parent
e96538bae0
commit
862445259e
17 files changed
+33
-71
No files matched your search
@@ -1,7 +1,5 @@
|
||||
import { getAccountInfo } from '../../_core/blitz/getAccountInfo';
|
||||
import { Region } from '../../constants/regions';
|
||||
import { WARGAMING_APPLICATION_ID } from '../../constants/wargamingApplicationID';
|
||||
import { AccountInfo } from '../../types/accountInfo';
|
||||
import getWargamingResponse from '../blitz/getWargamingResponse';
|
||||
import linkButton from '../discord/linkButton';
|
||||
|
||||
export async function getBlitzStarsLinkButton(
|
||||
@@ -9,11 +7,7 @@ export async function getBlitzStarsLinkButton(
|
||||
id: number,
|
||||
tankId?: number,
|
||||
) {
|
||||
const { nickname } = (
|
||||
await getWargamingResponse<AccountInfo>(
|
||||
`https://api.wotblitz.${region}/wotb/account/info/?application_id=${WARGAMING_APPLICATION_ID}&account_id=${id}`,
|
||||
)
|
||||
)[id];
|
||||
const { nickname } = await getAccountInfo(region, id);
|
||||
|
||||
return linkButton(
|
||||
`https://www.blitzstars.com/player/${region}/${nickname}${
|
||||
|
||||
Reference in new issue
Block a user