mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: core chunk 4
This commit is contained in:
1 parent
b827f7f730
commit
9bdb14e13a
22 files changed
+46
-31
No files matched your search
@@ -82,7 +82,7 @@ export const fullStatsCommand = new Promise<CommandRegistryRaw>(
|
||||
async handler(interaction) {
|
||||
const player = await resolvePlayerFromCommand(interaction);
|
||||
const period = resolvePeriodFromCommand(player.region, interaction);
|
||||
const filters = getFiltersFromCommand(interaction);
|
||||
const filters = await getFiltersFromCommand(interaction);
|
||||
const path = interactionToURL(interaction, {
|
||||
...player,
|
||||
...getCustomPeriodParams(interaction),
|
||||
|
||||
@@ -5,7 +5,6 @@ import {
|
||||
SlashCommandSubcommandGroupBuilder,
|
||||
} from 'discord.js';
|
||||
import { BlitzkriegRatingsLeaderboard } from '../../scripts/buildRatingsLeaderboard';
|
||||
import regionToRegionSubdomain from '../LEGACY_core/blitz/regionToRegionSubdomain';
|
||||
import getMidnightLeaderboard, {
|
||||
DATABASE_REPO,
|
||||
} from '../LEGACY_core/database/getMidnightLeaderboard';
|
||||
@@ -23,6 +22,7 @@ import { REGION_NAMES_SHORT, Region } from '../constants/regions';
|
||||
import { getAccountInfo } from '../core/blitz/getAccountInfo';
|
||||
import { getClanAccountInfo } from '../core/blitz/getClanAccountInfo';
|
||||
import getRatingsInfo from '../core/blitz/getRatingsInfo';
|
||||
import regionToRegionSubdomain from '../core/blitz/regionToRegionSubdomain';
|
||||
import getArchivedRatingsInfo from '../core/blitzkrieg/getArchivedRatingsInfo';
|
||||
import { CommandRegistryRaw } from '../events/interactionCreate';
|
||||
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
import { SlashCommandBuilder } from 'discord.js';
|
||||
import markdownEscape from 'markdown-escape';
|
||||
import { AccountList, usernamePattern } from '../LEGACY_core/blitz/listPlayers';
|
||||
import addRegionChoices from '../LEGACY_core/discord/addRegionChoices';
|
||||
import addUsernameChoices from '../LEGACY_core/discord/addUsernameChoices';
|
||||
import embedInfo from '../LEGACY_core/discord/embedInfo';
|
||||
import { REGION_NAMES, Region } from '../constants/regions';
|
||||
import { WARGAMING_APPLICATION_ID } from '../constants/wargamingApplicationID';
|
||||
import fetchBlitz from '../core/blitz/fetchWargaming';
|
||||
import {
|
||||
AccountList,
|
||||
usernamePattern,
|
||||
} from '../core/blitz/searchPlayersAcrossRegions';
|
||||
import { CommandRegistry } from '../events/interactionCreate';
|
||||
|
||||
export const searchPlayersCommand: CommandRegistry = {
|
||||
|
||||
@@ -74,7 +74,7 @@ export const statsCommand = new Promise<CommandRegistryRaw>(async (resolve) => {
|
||||
async handler(interaction) {
|
||||
const player = await resolvePlayerFromCommand(interaction);
|
||||
const period = resolvePeriodFromCommand(player.region, interaction);
|
||||
const filters = getFiltersFromCommand(interaction);
|
||||
const filters = await getFiltersFromCommand(interaction);
|
||||
const path = interactionToURL(interaction, {
|
||||
...player,
|
||||
...getCustomPeriodParams(interaction),
|
||||
|
||||
Reference in new issue
Block a user