mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
feat: added ratings leaderboard generation and publication
This commit is contained in:
1 parent
098e6c09b9
commit
6d9e6973d5
35 files changed
+412
-84
No files matched your search
@@ -4,7 +4,7 @@ import NoData, { NoDataType } from '../components/NoData';
|
||||
import PoweredBy, { PoweredByType } from '../components/PoweredBy';
|
||||
import TitleBar from '../components/TitleBar';
|
||||
import Wrapper from '../components/Wrapper';
|
||||
import { BLITZ_SERVERS } from '../constants/servers';
|
||||
import { REGION_DOMAIN_NAMES } from '../constants/regions';
|
||||
import getBlitzClan from '../core/blitz/getBlitzClan';
|
||||
import getWargamingResponse from '../core/blitz/getWargamingResponse';
|
||||
import addClanChoices from '../core/discord/addClanChoices';
|
||||
@@ -72,7 +72,7 @@ export const inactiveCommand: CommandRegistry = {
|
||||
nameDiscriminator="(Inactivity)"
|
||||
image={`https://wotblitz-gc.gcdn.co/icons/clanEmblems1x/clan-icon-v2-${clanData.emblem_set_id}.png`}
|
||||
description={`${threshold}+ Days • ${new Date().toDateString()} • ${
|
||||
BLITZ_SERVERS[server]
|
||||
REGION_DOMAIN_NAMES[server]
|
||||
}`}
|
||||
/>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import PoweredBy, { PoweredByType } from '../components/PoweredBy';
|
||||
import * as Tanks from '../components/Tanks';
|
||||
import TitleBar from '../components/TitleBar';
|
||||
import Wrapper from '../components/Wrapper';
|
||||
import { BLITZ_SERVERS } from '../constants/servers';
|
||||
import { REGION_DOMAIN_NAMES } from '../constants/regions';
|
||||
import getTankStats from '../core/blitz/getTankStats';
|
||||
import getTreeType from '../core/blitz/getTreeType';
|
||||
import getWargamingResponse from '../core/blitz/getWargamingResponse';
|
||||
@@ -105,7 +105,7 @@ export const ownedTanksCommand: CommandRegistry = {
|
||||
: undefined
|
||||
}
|
||||
description={`Owned tanks • ${new Date().toDateString()} • ${
|
||||
BLITZ_SERVERS[server]
|
||||
REGION_DOMAIN_NAMES[server]
|
||||
}`}
|
||||
/>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { SlashCommandBuilder } from 'discord.js';
|
||||
import markdownEscape from 'markdown-escape';
|
||||
import { BLITZ_SERVERS, BlitzServer } from '../constants/servers';
|
||||
import { REGION_DOMAIN_NAMES, RegionDomain } from '../constants/regions';
|
||||
import getWargamingResponse from '../core/blitz/getWargamingResponse';
|
||||
import addClanChoices from '../core/discord/addClanChoices';
|
||||
import addServerChoices from '../core/discord/addServerChoices';
|
||||
@@ -28,7 +28,7 @@ export const searchClansCommand: CommandRegistry = {
|
||||
),
|
||||
|
||||
async handler(interaction) {
|
||||
const server = interaction.options.getString('server') as BlitzServer;
|
||||
const server = interaction.options.getString('server') as RegionDomain;
|
||||
const clan = interaction.options.getString('clan')!;
|
||||
const limit = interaction.options.getInteger('limit') ?? 25;
|
||||
const clanList = await getWargamingResponse<ClanList>(
|
||||
@@ -36,7 +36,9 @@ export const searchClansCommand: CommandRegistry = {
|
||||
);
|
||||
|
||||
return embedInfo(
|
||||
`Clan search for "${markdownEscape(clan)}" in ${BLITZ_SERVERS[server]}`,
|
||||
`Clan search for "${markdownEscape(clan)}" in ${
|
||||
REGION_DOMAIN_NAMES[server]
|
||||
}`,
|
||||
clanList.length === 0
|
||||
? 'No clans found.'
|
||||
: `\`\`\`\n${clanList
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { SlashCommandBuilder } from 'discord.js';
|
||||
import markdownEscape from 'markdown-escape';
|
||||
import { BLITZ_SERVERS, BlitzServer } from '../constants/servers';
|
||||
import { REGION_DOMAIN_NAMES, RegionDomain } from '../constants/regions';
|
||||
import getWargamingResponse from '../core/blitz/getWargamingResponse';
|
||||
import { usernamePattern } from '../core/blitz/listPlayers';
|
||||
import addServerChoices from '../core/discord/addServerChoices';
|
||||
@@ -31,7 +31,7 @@ export const searchPlayersCommand: CommandRegistry = {
|
||||
),
|
||||
|
||||
async handler(interaction) {
|
||||
const server = interaction.options.getString('server') as BlitzServer;
|
||||
const server = interaction.options.getString('server') as RegionDomain;
|
||||
const name = interaction.options.getString('username')!;
|
||||
const limit = interaction.options.getInteger('limit') ?? 25;
|
||||
const trimmedSearch = name.trim();
|
||||
@@ -44,7 +44,9 @@ export const searchPlayersCommand: CommandRegistry = {
|
||||
: [];
|
||||
|
||||
return embedInfo(
|
||||
`Player search for "${markdownEscape(name)}" in ${BLITZ_SERVERS[server]}`,
|
||||
`Player search for "${markdownEscape(name)}" in ${
|
||||
REGION_DOMAIN_NAMES[server]
|
||||
}`,
|
||||
`\`\`\`${
|
||||
players.length === 0
|
||||
? 'No players found.'
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
export type RegionDomain = 'com' | 'eu' | 'asia';
|
||||
export type RegionSubdomain = 'na' | 'eu' | 'asia';
|
||||
|
||||
export const REGION_DOMAIN_NAMES: Record<RegionDomain, string> = {
|
||||
com: 'North America',
|
||||
eu: 'Europe',
|
||||
asia: 'Asia',
|
||||
};
|
||||
|
||||
export const REGION_SUBDOMAIN_NAMES: Record<RegionSubdomain, string> = {
|
||||
na: 'North America',
|
||||
eu: 'Europe',
|
||||
asia: 'Asia',
|
||||
};
|
||||
@@ -1,7 +0,0 @@
|
||||
export type BlitzServer = 'com' | 'eu' | 'asia';
|
||||
|
||||
export const BLITZ_SERVERS: Record<BlitzServer, string> = {
|
||||
com: 'North America',
|
||||
eu: 'Europe',
|
||||
asia: 'Asia',
|
||||
};
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BlitzServer } from '../../constants/servers';
|
||||
import { RegionDomain } from '../../constants/regions';
|
||||
import { serverAndIdPattern } from '../discord/resolvePlayerFromCommand';
|
||||
import throwError from '../node/throwError';
|
||||
import listClans from './listClans';
|
||||
@@ -6,7 +6,7 @@ import listClans from './listClans';
|
||||
export default async function getBlitzClan(clan: string) {
|
||||
if (serverAndIdPattern.test(clan)) {
|
||||
const [server, accountId] = clan.split('/');
|
||||
return { server: server as BlitzServer, id: Number(accountId) };
|
||||
return { server: server as RegionDomain, id: Number(accountId) };
|
||||
} else {
|
||||
const accounts = await listClans(clan);
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { BLITZ_SERVERS, BlitzServer } from '../../constants/servers';
|
||||
import { REGION_DOMAIN_NAMES, RegionDomain } from '../../constants/regions';
|
||||
import { TanksStats } from '../../types/tanksStats';
|
||||
import { WARGAMING_APPLICATION_ID } from '../node/arguments';
|
||||
import throwError from '../node/throwError';
|
||||
import getWargamingResponse from './getWargamingResponse';
|
||||
|
||||
export default async function getTankStats(server: BlitzServer, id: number) {
|
||||
export default async function getTankStats(server: RegionDomain, id: number) {
|
||||
const tankStats = await getWargamingResponse<TanksStats>(
|
||||
`https://api.wotblitz.${server}/wotb/tanks/stats/?application_id=${WARGAMING_APPLICATION_ID}&account_id=${id}`,
|
||||
);
|
||||
@@ -12,7 +12,7 @@ export default async function getTankStats(server: BlitzServer, id: number) {
|
||||
if (tankStats[id] === null) {
|
||||
throw throwError(
|
||||
'No tank stats available',
|
||||
`Wargaming says there is no tank stats for this account. This account may not have any battles/tanks or exist in the ${BLITZ_SERVERS[server]} server.`,
|
||||
`Wargaming says there is no tank stats for this account. This account may not have any battles/tanks or exist in the ${REGION_DOMAIN_NAMES[server]} server.`,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BlitzServer } from '../../constants/servers';
|
||||
import { RegionDomain } from '../../constants/regions';
|
||||
import { Clan, ClanList } from '../../types/clanList';
|
||||
import { WARGAMING_APPLICATION_ID } from '../node/arguments';
|
||||
import getWargamingResponse from './getWargamingResponse';
|
||||
@@ -21,7 +21,7 @@ export default async function listClans(search: string, limit = 9) {
|
||||
value &&
|
||||
value.map((account) => ({
|
||||
...account,
|
||||
server: 'com' as BlitzServer,
|
||||
server: 'com' as RegionDomain,
|
||||
})),
|
||||
),
|
||||
getWargamingResponse<ClanList>(
|
||||
@@ -31,7 +31,7 @@ export default async function listClans(search: string, limit = 9) {
|
||||
value &&
|
||||
value.map((account) => ({
|
||||
...account,
|
||||
server: 'eu' as BlitzServer,
|
||||
server: 'eu' as RegionDomain,
|
||||
})),
|
||||
),
|
||||
getWargamingResponse<ClanList>(
|
||||
@@ -41,7 +41,7 @@ export default async function listClans(search: string, limit = 9) {
|
||||
value &&
|
||||
value.map((account) => ({
|
||||
...account,
|
||||
server: 'asia' as BlitzServer,
|
||||
server: 'asia' as RegionDomain,
|
||||
})),
|
||||
),
|
||||
])
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BlitzServer } from '../../constants/servers';
|
||||
import { RegionDomain } from '../../constants/regions';
|
||||
import { Account, AccountList } from '../../types/accountList';
|
||||
import { WARGAMING_APPLICATION_ID } from '../node/arguments';
|
||||
import getWargamingResponse from './getWargamingResponse';
|
||||
@@ -25,7 +25,7 @@ export default async function listPlayers(search: string, limit = 9) {
|
||||
value &&
|
||||
value.map((account) => ({
|
||||
...account,
|
||||
server: 'com' as BlitzServer,
|
||||
server: 'com' as RegionDomain,
|
||||
})),
|
||||
),
|
||||
getWargamingResponse<AccountList>(
|
||||
@@ -35,7 +35,7 @@ export default async function listPlayers(search: string, limit = 9) {
|
||||
value &&
|
||||
value.map((account) => ({
|
||||
...account,
|
||||
server: 'eu' as BlitzServer,
|
||||
server: 'eu' as RegionDomain,
|
||||
})),
|
||||
),
|
||||
getWargamingResponse<AccountList>(
|
||||
@@ -45,7 +45,7 @@ export default async function listPlayers(search: string, limit = 9) {
|
||||
value &&
|
||||
value.map((account) => ({
|
||||
...account,
|
||||
server: 'asia' as BlitzServer,
|
||||
server: 'asia' as RegionDomain,
|
||||
})),
|
||||
),
|
||||
])
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BlitzServer } from '../../constants/servers';
|
||||
import { RegionDomain } from '../../constants/regions';
|
||||
import { AllStats } from '../../types/accountInfo';
|
||||
import getTankHistories, {
|
||||
TankHistories,
|
||||
@@ -35,7 +35,7 @@ export const emptyTankHistoryNode: TankHistoryRaw = {
|
||||
};
|
||||
|
||||
export default async function getDiffedTankStats(
|
||||
server: BlitzServer,
|
||||
server: RegionDomain,
|
||||
id: number,
|
||||
start: number,
|
||||
end: number,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { BlitzServer } from '../../constants/servers';
|
||||
import { RegionDomain } from '../../constants/regions';
|
||||
import { Period } from '../discord/addPeriodSubCommands';
|
||||
import getTimeDaysAgo from './getTimeDaysAgo';
|
||||
|
||||
export default function getPeriodStart(
|
||||
server: BlitzServer,
|
||||
server: RegionDomain,
|
||||
period: Exclude<Period, 'custom'>,
|
||||
) {
|
||||
if (period === 'career') {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BlitzServer } from '../../constants/servers';
|
||||
import { RegionDomain } from '../../constants/regions';
|
||||
import { AccountInfo, AllStats } from '../../types/accountInfo';
|
||||
import {
|
||||
GetHistoriesOptions,
|
||||
@@ -25,13 +25,13 @@ export interface PlayerHistoryRaw {
|
||||
account_id: number;
|
||||
[key: string]: number;
|
||||
};
|
||||
region: BlitzServer;
|
||||
region: RegionDomain;
|
||||
}
|
||||
|
||||
export type PlayerHistoriesRaw = PlayerHistoryRaw[];
|
||||
|
||||
export default async function getPlayerHistories(
|
||||
server: BlitzServer,
|
||||
server: RegionDomain,
|
||||
id: number,
|
||||
options?: Partial<GetHistoriesOptions>,
|
||||
) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BlitzServer } from '../../constants/servers';
|
||||
import { RegionDomain } from '../../constants/regions';
|
||||
import {
|
||||
GetHistoriesOptions,
|
||||
Histories,
|
||||
@@ -32,7 +32,7 @@ export const getTankHistoriesDefaultOptions: GetTankHistoriesOptions = {
|
||||
};
|
||||
|
||||
export default async function getTankHistories(
|
||||
server: BlitzServer,
|
||||
server: RegionDomain,
|
||||
id: number,
|
||||
options?: Partial<GetTankHistoriesOptions>,
|
||||
) {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { BlitzServer } from '../../constants/servers';
|
||||
import { RegionDomain } from '../../constants/regions';
|
||||
|
||||
export const TIME_ZONE_MAPPINGS: Record<BlitzServer, number> = {
|
||||
export const TIME_ZONE_MAPPINGS: Record<RegionDomain, number> = {
|
||||
com: -5, // Central North American Time
|
||||
eu: +1, // Central European Time
|
||||
asia: +7, // Central Asia Standard Time
|
||||
};
|
||||
|
||||
export default function getTimeDaysAgo(server: BlitzServer, daysAgo: number) {
|
||||
export default function getTimeDaysAgo(server: RegionDomain, daysAgo: number) {
|
||||
const now = new Date();
|
||||
if (daysAgo === 0) now.getTime() / 1000;
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { SlashCommandStringOption } from 'discord.js';
|
||||
import { BLITZ_SERVERS } from '../../constants/servers';
|
||||
import { REGION_DOMAIN_NAMES } from '../../constants/regions';
|
||||
|
||||
export default function addServerChoices(option: SlashCommandStringOption) {
|
||||
return option
|
||||
.setName('server')
|
||||
.setDescription('The Blitz server you are in')
|
||||
.addChoices(
|
||||
{ name: BLITZ_SERVERS.com, value: 'com' },
|
||||
{ name: BLITZ_SERVERS.eu, value: 'eu' },
|
||||
{ name: BLITZ_SERVERS.asia, value: 'asia' },
|
||||
{ name: REGION_DOMAIN_NAMES.com, value: 'com' },
|
||||
{ name: REGION_DOMAIN_NAMES.eu, value: 'eu' },
|
||||
{ name: REGION_DOMAIN_NAMES.asia, value: 'asia' },
|
||||
)
|
||||
.setRequired(true);
|
||||
}
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
AutocompleteInteraction,
|
||||
CacheType,
|
||||
} from 'discord.js';
|
||||
import { BLITZ_SERVERS } from '../../constants/servers';
|
||||
import { REGION_DOMAIN_NAMES } from '../../constants/regions';
|
||||
import listClans from '../blitz/listClans';
|
||||
|
||||
export default async function autocompleteClan(
|
||||
@@ -18,7 +18,7 @@ export default async function autocompleteClan(
|
||||
? players.map(
|
||||
(player) =>
|
||||
({
|
||||
name: `${player.name} (${BLITZ_SERVERS[player.server]})`,
|
||||
name: `${player.name} (${REGION_DOMAIN_NAMES[player.server]})`,
|
||||
value: `${player.server}/${player.clan_id}`,
|
||||
}) satisfies ApplicationCommandOptionChoiceData<string>,
|
||||
)
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
AutocompleteInteraction,
|
||||
CacheType,
|
||||
} from 'discord.js';
|
||||
import { BLITZ_SERVERS } from '../../constants/servers';
|
||||
import { REGION_DOMAIN_NAMES } from '../../constants/regions';
|
||||
import listPlayers from '../blitz/listPlayers';
|
||||
|
||||
export default async function autocompleteUsername(
|
||||
@@ -19,7 +19,9 @@ export default async function autocompleteUsername(
|
||||
? players.map(
|
||||
(player) =>
|
||||
({
|
||||
name: `${player.nickname} (${BLITZ_SERVERS[player.server]})`,
|
||||
name: `${player.nickname} (${
|
||||
REGION_DOMAIN_NAMES[player.server]
|
||||
})`,
|
||||
value: `${player.server}/${player.account_id}`,
|
||||
}) satisfies ApplicationCommandOptionChoiceData<string>,
|
||||
)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { ButtonInteraction, CacheType } from 'discord.js';
|
||||
import { CYCLIC_API } from '../../constants/cyclic';
|
||||
import { BlitzServer } from '../../constants/servers';
|
||||
import { RegionDomain } from '../../constants/regions';
|
||||
import resolvePeriodFromURL from '../express/resolvePeriodFromURL';
|
||||
|
||||
export default function resolvePeriodFromButton(
|
||||
server: BlitzServer,
|
||||
server: RegionDomain,
|
||||
interaction: ButtonInteraction<CacheType>,
|
||||
) {
|
||||
return resolvePeriodFromURL(server, `${CYCLIC_API}/${interaction.customId}`);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { CacheType, ChatInputCommandInteraction } from 'discord.js';
|
||||
import { BlitzServer } from '../../constants/servers';
|
||||
import { RegionDomain } from '../../constants/regions';
|
||||
import getPeriodNow from '../blitzstars/getPeriodNow';
|
||||
import getPeriodStart from '../blitzstars/getPeriodStart';
|
||||
import getTimeDaysAgo from '../blitzstars/getTimeDaysAgo';
|
||||
@@ -31,7 +31,7 @@ export interface ResolvedPeriod {
|
||||
}
|
||||
|
||||
export default function resolvePeriodFromCommand(
|
||||
server: BlitzServer,
|
||||
server: RegionDomain,
|
||||
interaction: ChatInputCommandInteraction<CacheType>,
|
||||
) {
|
||||
let statsName: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { CacheType, ChatInputCommandInteraction } from 'discord.js';
|
||||
import { BlitzServer } from '../../constants/servers';
|
||||
import { RegionDomain } from '../../constants/regions';
|
||||
import listPlayers, {
|
||||
usernamePatternWithoutPosition,
|
||||
} from '../blitz/listPlayers';
|
||||
@@ -8,7 +8,7 @@ import throwError from '../node/throwError';
|
||||
export const serverAndIdPattern = /(com|eu|asia)\/[0-9]+/;
|
||||
|
||||
export interface ResolvedPlayer {
|
||||
server: BlitzServer;
|
||||
server: RegionDomain;
|
||||
id: number;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ export default async function resolvePlayerFromCommand(
|
||||
if (serverAndIdPattern.test(username)) {
|
||||
const [server, accountId] = username.split('/');
|
||||
return {
|
||||
server: server as BlitzServer,
|
||||
server: server as RegionDomain,
|
||||
id: Number(accountId),
|
||||
} satisfies ResolvedPlayer;
|
||||
} else {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Request } from 'express';
|
||||
import { CYCLIC_API } from '../../constants/cyclic';
|
||||
import { BlitzServer } from '../../constants/servers';
|
||||
import { RegionDomain } from '../../constants/regions';
|
||||
import resolvePeriodFromURL from './resolvePeriodFromURL';
|
||||
|
||||
export default function resolvePeriodFromRequest(
|
||||
server: BlitzServer,
|
||||
server: RegionDomain,
|
||||
request: Request,
|
||||
) {
|
||||
return resolvePeriodFromURL(server, `${CYCLIC_API}${request.path}`);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BlitzServer } from '../../constants/servers';
|
||||
import { RegionDomain } from '../../constants/regions';
|
||||
import getPeriodNow from '../blitzstars/getPeriodNow';
|
||||
import getPeriodStart from '../blitzstars/getPeriodStart';
|
||||
import getTimeDaysAgo from '../blitzstars/getTimeDaysAgo';
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
} from '../discord/resolvePeriodFromCommand';
|
||||
|
||||
export default function resolvePeriodFromURL(
|
||||
server: BlitzServer,
|
||||
server: RegionDomain,
|
||||
urlString: string,
|
||||
) {
|
||||
let statsName: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BlitzServer } from '../../constants/servers';
|
||||
import { RegionDomain } from '../../constants/regions';
|
||||
import { ResolvedPlayer } from '../discord/resolvePlayerFromCommand';
|
||||
|
||||
export default function resolvePlayerFromURL(urlString: string) {
|
||||
@@ -6,6 +6,6 @@ export default function resolvePlayerFromURL(urlString: string) {
|
||||
|
||||
return {
|
||||
id: parseInt(url.searchParams.get('id')!),
|
||||
server: url.searchParams.get('server') as BlitzServer,
|
||||
server: url.searchParams.get('server') as RegionDomain,
|
||||
} satisfies ResolvedPlayer;
|
||||
}
|
||||
@@ -3,7 +3,7 @@ import NoData, { NoDataType } from '../components/NoData';
|
||||
import PoweredBy, { PoweredByType } from '../components/PoweredBy';
|
||||
import TitleBar from '../components/TitleBar';
|
||||
import Wrapper from '../components/Wrapper';
|
||||
import { BLITZ_SERVERS } from '../constants/servers';
|
||||
import { REGION_DOMAIN_NAMES } from '../constants/regions';
|
||||
import getWargamingResponse from '../core/blitz/getWargamingResponse';
|
||||
import resolveTankName from '../core/blitz/resolveTankName';
|
||||
import { tankopedia } from '../core/blitz/tankopedia';
|
||||
@@ -89,7 +89,7 @@ export default async function evolution<Type extends StatType>(
|
||||
nameDiscriminator={nameDiscriminator}
|
||||
image={image}
|
||||
description={`${evolutionName} • ${new Date().toDateString()} • ${
|
||||
BLITZ_SERVERS[server]
|
||||
REGION_DOMAIN_NAMES[server]
|
||||
}`}
|
||||
/>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import PoweredBy, { PoweredByType } from '../components/PoweredBy';
|
||||
import TierWeights, { TierWeightsRecord } from '../components/TierWeights';
|
||||
import TitleBar from '../components/TitleBar';
|
||||
import Wrapper from '../components/Wrapper';
|
||||
import { BLITZ_SERVERS } from '../constants/servers';
|
||||
import { REGION_DOMAIN_NAMES } from '../constants/regions';
|
||||
import calculateWN8 from '../core/blitz/calculateWN8';
|
||||
import getWargamingResponse from '../core/blitz/getWargamingResponse';
|
||||
import resolveTankName from '../core/blitz/resolveTankName';
|
||||
@@ -143,7 +143,7 @@ export default async function fullStats<Type extends StatType>(
|
||||
nameDiscriminator={nameDiscriminator}
|
||||
image={image}
|
||||
description={`${statsName} • ${new Date().toDateString()} • ${
|
||||
BLITZ_SERVERS[server]
|
||||
REGION_DOMAIN_NAMES[server]
|
||||
}`}
|
||||
/>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import PoweredBy, { PoweredByType } from '../components/PoweredBy';
|
||||
import { TierWeightsRecord } from '../components/TierWeights';
|
||||
import TitleBar from '../components/TitleBar';
|
||||
import Wrapper from '../components/Wrapper';
|
||||
import { BLITZ_SERVERS } from '../constants/servers';
|
||||
import { REGION_DOMAIN_NAMES } from '../constants/regions';
|
||||
import calculateWN8 from '../core/blitz/calculateWN8';
|
||||
import getWargamingResponse from '../core/blitz/getWargamingResponse';
|
||||
import resolveTankName from '../core/blitz/resolveTankName';
|
||||
@@ -164,7 +164,7 @@ export default async function stats<Type extends StatType>(
|
||||
nameDiscriminator={nameDiscriminator}
|
||||
image={image}
|
||||
description={`${statsName} • ${new Date().toDateString()} • ${
|
||||
BLITZ_SERVERS[server]
|
||||
REGION_DOMAIN_NAMES[server]
|
||||
}`}
|
||||
/>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import NoData, { NoDataType } from '../components/NoData';
|
||||
import PoweredBy, { PoweredByType } from '../components/PoweredBy';
|
||||
import TitleBar from '../components/TitleBar';
|
||||
import Wrapper from '../components/Wrapper';
|
||||
import { BLITZ_SERVERS } from '../constants/servers';
|
||||
import { REGION_DOMAIN_NAMES } from '../constants/regions';
|
||||
import calculateWN8 from '../core/blitz/calculateWN8';
|
||||
import getTankStats from '../core/blitz/getTankStats';
|
||||
import getWargamingResponse from '../core/blitz/getWargamingResponse';
|
||||
@@ -162,7 +162,7 @@ export default async function today(
|
||||
: undefined
|
||||
}
|
||||
description={`Today's breakdown • ${new Date().toDateString()} • ${
|
||||
BLITZ_SERVERS[server]
|
||||
REGION_DOMAIN_NAMES[server]
|
||||
}`}
|
||||
/>
|
||||
|
||||
|
||||
Reference in new issue
Block a user