mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
fix: more imports
This commit is contained in:
1 parent
25cfb7db74
commit
4f24db0956
182 files changed
+456
-452
No files matched your search
@@ -0,0 +1,3 @@
|
||||
export function normalizeLeagueIcon(url: string) {
|
||||
return url.startsWith('http') ? url : `https:${url}`;
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import { UserError } from '../../../../website/src/hooks/userError';
|
||||
import { tankNamesTechTreeOnly } from '../discord/autocompleteTanks';
|
||||
import { translator } from '../localization/translator';
|
||||
|
||||
export default async function resolveTankId(
|
||||
export async function resolveTankId(
|
||||
tank: string | number,
|
||||
locale: Locale,
|
||||
techTreeOnly = false,
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export default function getPeriodNow() {
|
||||
export function getPeriodNow() {
|
||||
return Date.now() / 1000;
|
||||
}
|
||||
@@ -2,7 +2,7 @@ import { Region } from '@blitzkit/core';
|
||||
import getTimeDaysAgo from '../../../../website/src/core/blitzkit/getTimeDaysAgo';
|
||||
import { PeriodSize } from '../discord/addPeriodSubCommands';
|
||||
|
||||
export default function getPeriodStart(region: Region, period: PeriodSize) {
|
||||
export function getPeriodStart(region: Region, period: PeriodSize) {
|
||||
if (period === 'career') return 0;
|
||||
if (period === 'today') return getTimeDaysAgo(region, 1);
|
||||
return getTimeDaysAgo(region, parseInt(period));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import jsxToSvg from './jsxToSvg';
|
||||
import svgToPng from './svgToPng';
|
||||
import { jsxToSvg } from './jsxToSvg';
|
||||
import { svgToPng } from './svgToPng';
|
||||
|
||||
export default async function jsxToPng(jsx: JSX.Element) {
|
||||
export async function jsxToPng(jsx: JSX.Element) {
|
||||
const svg = await jsxToSvg(jsx);
|
||||
const png = svgToPng(svg);
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { RenderConfiguration } from '../../../../website/src/core/blitzkit/renderConfiguration';
|
||||
import jsxToSvg from './jsxToSvg';
|
||||
import { jsxToSvg } from './jsxToSvg';
|
||||
import { svgToPngThreaded } from './svgToPngThreaded';
|
||||
|
||||
export default async function jsxToPngThreaded(
|
||||
export async function jsxToPngThreaded(
|
||||
jsx: JSX.Element,
|
||||
renderConfiguration: RenderConfiguration,
|
||||
) {
|
||||
|
||||
@@ -14,7 +14,7 @@ const fontsPromise = [
|
||||
return { name: 'Roboto', weight, data };
|
||||
});
|
||||
|
||||
export default async function jsxToSvg(
|
||||
export async function jsxToSvg(
|
||||
jsx: JSX.Element,
|
||||
renderConfiguration = new RenderConfiguration(),
|
||||
) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Resvg } from '@resvg/resvg-js';
|
||||
|
||||
export default function svgToPng(svg: string) {
|
||||
export function svgToPng(svg: string) {
|
||||
return new Resvg(svg).render().asPng();
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
} from '../../types/histories';
|
||||
import { PlayerStats } from './getPlayerStats';
|
||||
|
||||
export default async function getPlayerHistories(
|
||||
export async function getPlayerHistories(
|
||||
server: Region,
|
||||
id: number,
|
||||
options?: Partial<GetHistoriesOptions>,
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
import { BlitzStats, emptyAllStats, Region } from '@blitzkit/core';
|
||||
import { DiffedTankStats } from '@blitzkit/core/src/statistics/filterStats';
|
||||
import {
|
||||
BlitzStats,
|
||||
DiffedTankStats,
|
||||
emptyAllStats,
|
||||
Region,
|
||||
} from '@blitzkit/core';
|
||||
import { Locale } from 'discord.js';
|
||||
import getTankHistories, {
|
||||
import {
|
||||
getTankHistories,
|
||||
TankHistories,
|
||||
TankHistoryRaw,
|
||||
} from './getTankHistories';
|
||||
@@ -16,7 +21,7 @@ const emptyTankHistoryNode: TankHistoryRaw = {
|
||||
};
|
||||
|
||||
// BIG TODO: merge this neatly with diffNormalizedTankStats
|
||||
export default async function getStatsInPeriod(
|
||||
export async function getStatsInPeriod(
|
||||
server: Region,
|
||||
id: number,
|
||||
start: number,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Region, emptyAllStats } from '@blitzkit/core';
|
||||
import { Locale } from 'discord.js';
|
||||
import getTankStats from '../../../../website/src/core/blitz/getTankStats';
|
||||
import { getTankStats } from '../../../../website/src/core/blitz/getTankStats';
|
||||
import { UserError } from '../../../../website/src/hooks/userError';
|
||||
import {
|
||||
GetHistoriesOptions,
|
||||
@@ -33,7 +33,7 @@ const getTankHistoriesDefaultOptions: GetTankHistoriesOptions = {
|
||||
tankId: undefined,
|
||||
};
|
||||
|
||||
export default async function getTankHistories(
|
||||
export async function getTankHistories(
|
||||
server: Region,
|
||||
id: number,
|
||||
locale: Locale,
|
||||
@@ -52,7 +52,7 @@ export default async function getTankHistories(
|
||||
all: history.all,
|
||||
last_battle_time: history.last_battle_time,
|
||||
tank_id: history.tank_id,
|
||||
} satisfies TankHistory),
|
||||
}) satisfies TankHistory,
|
||||
);
|
||||
const compliantTanks: number[] = [];
|
||||
const lastBattles: Record<number, number> = {};
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Locale, SlashCommandStringOption } from 'discord.js';
|
||||
import { translator } from '../localization/translator';
|
||||
import { localizationObject } from './localizationObject';
|
||||
|
||||
export default function addClanChoices(option: SlashCommandStringOption) {
|
||||
export function addClanChoices(option: SlashCommandStringOption) {
|
||||
const { translate } = translator(Locale.EnglishUS);
|
||||
|
||||
return option
|
||||
|
||||
@@ -6,8 +6,8 @@ import {
|
||||
SlashCommandSubcommandBuilder,
|
||||
} from 'discord.js';
|
||||
import { translator } from '../localization/translator';
|
||||
import addTankChoices from './addTankChoices';
|
||||
import addTierChoices from './addTierChoices';
|
||||
import { addTankChoices } from './addTankChoices';
|
||||
import { addTierChoices } from './addTierChoices';
|
||||
import { localizationObject } from './localizationObject';
|
||||
|
||||
export function addFilterOptions<
|
||||
@@ -38,7 +38,7 @@ export function addFilterOptions<
|
||||
name_localizations: localizationObject(
|
||||
`common.nations.${nation}`,
|
||||
),
|
||||
} satisfies APIApplicationCommandOptionChoice),
|
||||
}) satisfies APIApplicationCommandOptionChoice,
|
||||
),
|
||||
)
|
||||
.setRequired(false),
|
||||
@@ -67,7 +67,7 @@ export function addFilterOptions<
|
||||
name_localizations: localizationObject(
|
||||
`common.tank_class_short.${tankType}`,
|
||||
),
|
||||
} satisfies APIApplicationCommandOptionChoice),
|
||||
}) satisfies APIApplicationCommandOptionChoice,
|
||||
),
|
||||
)
|
||||
.setRequired(false),
|
||||
@@ -95,7 +95,7 @@ export function addFilterOptions<
|
||||
name_localizations: localizationObject(
|
||||
`common.tree_type.${treeType}`,
|
||||
),
|
||||
} satisfies APIApplicationCommandOptionChoice),
|
||||
}) satisfies APIApplicationCommandOptionChoice,
|
||||
),
|
||||
)
|
||||
.setRequired(false),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { gameDefinitions } from '@blitzkit/core/src/blitzkit/gameDefinitions';
|
||||
import { gameDefinitions } from '@blitzkit/core';
|
||||
import {
|
||||
SlashCommandBuilder,
|
||||
SlashCommandSubcommandBuilder,
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
import { addFilterOptions } from './addFilterOptions';
|
||||
import { addPeriodSubCommands } from './addPeriodSubCommands';
|
||||
|
||||
export default async function addPeriodicFilterOptions<
|
||||
export async function addPeriodicFilterOptions<
|
||||
OptionType extends SlashCommandBuilder | SlashCommandSubcommandGroupBuilder,
|
||||
>(
|
||||
option: OptionType,
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
import { translator } from '../localization/translator';
|
||||
import { localizationObject } from './localizationObject';
|
||||
|
||||
export default function addRegionChoices(option: SlashCommandStringOption) {
|
||||
export function addRegionChoices(option: SlashCommandStringOption) {
|
||||
const { t, translate } = translator(Locale.EnglishUS);
|
||||
|
||||
return option
|
||||
@@ -26,7 +26,7 @@ export default function addRegionChoices(option: SlashCommandStringOption) {
|
||||
name_localizations: localizationObject(
|
||||
`common.regions.normal.${region}`,
|
||||
),
|
||||
} satisfies APIApplicationCommandOptionChoice),
|
||||
}) satisfies APIApplicationCommandOptionChoice,
|
||||
),
|
||||
)
|
||||
.setRequired(true);
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Locale, SlashCommandStringOption } from 'discord.js';
|
||||
import { translator } from '../localization/translator';
|
||||
import { localizationObject } from './localizationObject';
|
||||
|
||||
export default function addTankChoices(option: SlashCommandStringOption) {
|
||||
export function addTankChoices(option: SlashCommandStringOption) {
|
||||
const { translate } = translator(Locale.EnglishUS);
|
||||
|
||||
return option
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import numberToRomanNumeral from '@blitzkit/core/src/math/numberToRomanNumeral';
|
||||
import { numberToRomanNumeral } from '@blitzkit/core';
|
||||
import {
|
||||
APIApplicationCommandOptionChoice,
|
||||
Locale,
|
||||
@@ -8,7 +8,7 @@ import { range } from 'lodash';
|
||||
import { translator } from '../localization/translator';
|
||||
import { localizationObject } from './localizationObject';
|
||||
|
||||
export default function addTierChoices(option: SlashCommandStringOption) {
|
||||
export function addTierChoices(option: SlashCommandStringOption) {
|
||||
const { t, translate } = translator(Locale.EnglishUS);
|
||||
|
||||
return option
|
||||
@@ -31,7 +31,7 @@ export default function addTierChoices(option: SlashCommandStringOption) {
|
||||
'bot.common.options.tier.choices.tier',
|
||||
[`${tier}`, numberToRomanNumeral(tier)],
|
||||
),
|
||||
} satisfies APIApplicationCommandOptionChoice),
|
||||
}) satisfies APIApplicationCommandOptionChoice,
|
||||
),
|
||||
)
|
||||
.setRequired(true);
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Locale, SlashCommandStringOption } from 'discord.js';
|
||||
import { translator } from '../localization/translator';
|
||||
import { localizationObject } from './localizationObject';
|
||||
|
||||
export default function addUsernameChoices(option: SlashCommandStringOption) {
|
||||
export function addUsernameChoices(option: SlashCommandStringOption) {
|
||||
const { t } = translator(Locale.EnglishUS);
|
||||
|
||||
return option
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import searchClansAcrossRegions from '@blitzkit/core/src/blitz/searchClansAcrossRegions';
|
||||
import { searchClansAcrossRegions } from '@blitzkit/core';
|
||||
import {
|
||||
ApplicationCommandOptionChoiceData,
|
||||
AutocompleteInteraction,
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
import { translator } from '../../localization/translator';
|
||||
import { DISCORD_CHOICES_MAX_NAME_SIZE, OVERFLOW_SUFFIX } from './constants';
|
||||
|
||||
export default async function autocompleteClan(
|
||||
export async function autocompleteClan(
|
||||
interaction: AutocompleteInteraction<CacheType>,
|
||||
) {
|
||||
const { translate } = translator(interaction.locale);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { tankNames } from '@blitzkit/core';
|
||||
import {
|
||||
ApplicationCommandOptionChoiceData,
|
||||
AutocompleteInteraction,
|
||||
@@ -8,13 +9,12 @@ import {
|
||||
DISCORD_CHOICES_MAX_NAME_SIZE,
|
||||
OVERFLOW_SUFFIX,
|
||||
} from './autocompleteClan/constants';
|
||||
import { tankNames } from '@blitzkit/core';
|
||||
|
||||
export const tankNamesTechTreeOnly = tankNames.then((names) =>
|
||||
names.filter((tank) => tank.treeType === 'researchable'),
|
||||
);
|
||||
|
||||
export default async function autocompleteTanks(
|
||||
export async function autocompleteTanks(
|
||||
interaction: AutocompleteInteraction<CacheType>,
|
||||
techTreeOnly = false,
|
||||
fields = ['tank'],
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { searchPlayersAcrossRegions } from '@blitzkit/core';
|
||||
import {
|
||||
ApplicationCommandOptionChoiceData,
|
||||
AutocompleteInteraction,
|
||||
CacheType,
|
||||
} from 'discord.js';
|
||||
import searchPlayersAcrossRegions from '../../../../website/src/core/blitz/searchPlayersAcrossRegions';
|
||||
import { translator } from '../localization/translator';
|
||||
import {
|
||||
DISCORD_CHOICES_MAX_NAME_SIZE,
|
||||
OVERFLOW_SUFFIX,
|
||||
} from './autocompleteClan/constants';
|
||||
|
||||
export default async function autocompleteUsername(
|
||||
export async function autocompleteUsername(
|
||||
interaction: AutocompleteInteraction<CacheType>,
|
||||
) {
|
||||
const { translate } = translator(interaction.locale);
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
ComponentEmojiResolvable,
|
||||
} from 'discord.js';
|
||||
|
||||
export default function buttonLink(
|
||||
export function buttonLink(
|
||||
url: string,
|
||||
label: string,
|
||||
emoji?: ComponentEmojiResolvable,
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
ComponentEmojiResolvable,
|
||||
} from 'discord.js';
|
||||
|
||||
export default function buttonPrimary(
|
||||
export function buttonPrimary(
|
||||
id: string,
|
||||
label: string,
|
||||
emoji?: ComponentEmojiResolvable,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ChatInputCommandInteraction } from 'discord.js';
|
||||
import { translator } from '../localization/translator';
|
||||
import buttonPrimary from './buttonPrimary';
|
||||
import { buttonPrimary } from './buttonPrimary';
|
||||
|
||||
export function buttonRefresh(
|
||||
interaction: ChatInputCommandInteraction,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Client, GatewayIntentBits } from 'discord.js';
|
||||
import interactionCreate from '../../events/interactionCreate';
|
||||
import ready from '../../events/ready';
|
||||
import { interactionCreate } from '../../events/interactionCreate';
|
||||
import { ready } from '../../events/ready';
|
||||
|
||||
export const client = new Client({
|
||||
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers],
|
||||
|
||||
@@ -7,7 +7,7 @@ export interface Parameters {
|
||||
// TODO: automatically infer command options???
|
||||
// but how would that work with the region and id options?
|
||||
|
||||
export default function commandToURL(
|
||||
export function commandToURL(
|
||||
interaction: ChatInputCommandInteraction<CacheType>,
|
||||
parameters?: Parameters,
|
||||
) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { EmbedBuilder } from 'discord.js';
|
||||
import { ACCENT_COLOR } from './colors';
|
||||
|
||||
export default function embedInfo(title: string, description: string) {
|
||||
export function embedInfo(title: string, description: string) {
|
||||
const embed = new EmbedBuilder()
|
||||
.setColor(ACCENT_COLOR)
|
||||
.setDescription(description);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { EmbedBuilder } from 'discord.js';
|
||||
import { NEGATIVE_COLOR } from './colors';
|
||||
|
||||
export default function embedNegative(title: string, description: string) {
|
||||
export function embedNegative(title: string, description: string) {
|
||||
return new EmbedBuilder()
|
||||
.setColor(NEGATIVE_COLOR)
|
||||
.setTitle(title)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { EmbedBuilder } from 'discord.js';
|
||||
import { POSITIVE_COLOR } from './colors';
|
||||
|
||||
export default function embedPositive(title: string, description: string) {
|
||||
export function embedPositive(title: string, description: string) {
|
||||
return new EmbedBuilder()
|
||||
.setColor(POSITIVE_COLOR)
|
||||
.setTitle(title)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { EmbedBuilder } from 'discord.js';
|
||||
import { WARNING_COLOR } from './colors';
|
||||
|
||||
export default function embedWarning(title: string, description: string) {
|
||||
export function embedWarning(title: string, description: string) {
|
||||
return new EmbedBuilder()
|
||||
.setColor(WARNING_COLOR)
|
||||
.setTitle(title)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { StatFilters, TreeType } from '@blitzkit/core';
|
||||
import { ChatInputCommandInteraction } from 'discord.js';
|
||||
import resolveTankId from '../blitz/resolveTankId';
|
||||
import { resolveTankId } from '../blitz/resolveTankId';
|
||||
|
||||
export async function getFiltersFromCommand(
|
||||
interaction: ChatInputCommandInteraction,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export type TableInputEntry = [string, string | number] | [];
|
||||
export type TableInput = TableInputEntry[];
|
||||
|
||||
export default function markdownTable(input: TableInput) {
|
||||
export function markdownTable(input: TableInput) {
|
||||
return input
|
||||
.filter((array) => array[1] !== undefined)
|
||||
.map((array) => (array.length === 0 ? '' : `**${array[0]}**: ${array[1]}`))
|
||||
|
||||
@@ -10,9 +10,9 @@ import {
|
||||
import { RenderConfiguration } from '../../../../website/src/core/blitzkit/renderConfiguration';
|
||||
import { InteractionReturnable } from '../../events/interactionCreate';
|
||||
import { Writeable } from '../../types/writable';
|
||||
import jsxToPngThreaded from '../blitzkit/jsxToPngThreaded';
|
||||
import { jsxToPngThreaded } from '../blitzkit/jsxToPngThreaded';
|
||||
|
||||
export default async function normalizeInteractionReturnable(
|
||||
export async function normalizeInteractionReturnable(
|
||||
returnable: InteractionReturnable,
|
||||
) {
|
||||
const images: [number, Buffer][] = [];
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import { Region } from '@blitzkit/core';
|
||||
import searchClansAcrossRegions from '@blitzkit/core/src/blitz/searchClansAcrossRegions';
|
||||
import { Region, searchClansAcrossRegions } from '@blitzkit/core';
|
||||
import { ChatInputCommandInteraction } from 'discord.js';
|
||||
import markdownEscape from 'markdown-escape';
|
||||
import { UserError } from '../../../../website/src/hooks/userError';
|
||||
import { translator } from '../localization/translator';
|
||||
import { serverAndIdPattern } from './resolvePlayerFromCommand/constants';
|
||||
|
||||
export default async function resolveClanFromCommand(
|
||||
export async function resolveClanFromCommand(
|
||||
interaction: ChatInputCommandInteraction,
|
||||
) {
|
||||
const { translate } = translator(interaction.locale);
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { Region } from '@blitzkit/core';
|
||||
import { ButtonInteraction } from 'discord.js';
|
||||
import getTimeDaysAgo from '../../../../website/src/core/blitzkit/getTimeDaysAgo';
|
||||
import getPeriodNow from '../blitzkit/getPeriodNow';
|
||||
import getPeriodStart from '../blitzkit/getPeriodStart';
|
||||
import { getTimeDaysAgo } from '../../../../website/src/core/blitzkit/getTimeDaysAgo';
|
||||
import { getPeriodNow } from '../blitzkit/getPeriodNow';
|
||||
import { getPeriodStart } from '../blitzkit/getPeriodStart';
|
||||
import { PeriodType } from './addPeriodSubCommands';
|
||||
import { getPeriodOptionName } from './getPeriodOptionName';
|
||||
import { ResolvedPeriod } from './resolvePeriodFromCommand';
|
||||
|
||||
export default function resolvePeriodFromButton(
|
||||
export function resolvePeriodFromButton(
|
||||
region: Region,
|
||||
interaction: ButtonInteraction,
|
||||
) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Region } from '@blitzkit/core';
|
||||
import { CacheType, ChatInputCommandInteraction } from 'discord.js';
|
||||
import getTimeDaysAgo from '../../../../website/src/core/blitzkit/getTimeDaysAgo';
|
||||
import getPeriodNow from '../blitzkit/getPeriodNow';
|
||||
import getPeriodStart from '../blitzkit/getPeriodStart';
|
||||
import { getTimeDaysAgo } from '../../../../website/src/core/blitzkit/getTimeDaysAgo';
|
||||
import { getPeriodNow } from '../blitzkit/getPeriodNow';
|
||||
import { getPeriodStart } from '../blitzkit/getPeriodStart';
|
||||
import { translator } from '../localization/translator';
|
||||
import { PeriodType } from './addPeriodSubCommands';
|
||||
import { getPeriodOptionName } from './getPeriodOptionName';
|
||||
@@ -13,7 +13,7 @@ export interface ResolvedPeriod {
|
||||
end: number;
|
||||
}
|
||||
|
||||
export default function resolvePeriodFromCommand(
|
||||
export function resolvePeriodFromCommand(
|
||||
region: Region,
|
||||
interaction: ChatInputCommandInteraction<CacheType>,
|
||||
forcedPeriod?: PeriodType,
|
||||
|
||||
@@ -2,9 +2,7 @@ import { Region } from '@blitzkit/core';
|
||||
import { ButtonInteraction } from 'discord.js';
|
||||
import { ResolvedPlayer } from './resolvePlayerFromCommand';
|
||||
|
||||
export default async function resolvePlayerFromButton(
|
||||
interaction: ButtonInteraction,
|
||||
) {
|
||||
export async function resolvePlayerFromButton(interaction: ButtonInteraction) {
|
||||
const url = new URL(`https://exmaple.com/${interaction.customId}`);
|
||||
|
||||
return {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { Region } from '@blitzkit/core';
|
||||
import { Region, searchPlayersAcrossRegions } from '@blitzkit/core';
|
||||
import { CacheType, ChatInputCommandInteraction } from 'discord.js';
|
||||
import markdownEscape from 'markdown-escape';
|
||||
import searchPlayersAcrossRegions from '../../../../../website/src/core/blitz/searchPlayersAcrossRegions';
|
||||
import { UserError } from '../../../../../website/src/hooks/userError';
|
||||
import { getBlitzFromDiscord } from '../../blitzkit/getBlitzFromDiscord';
|
||||
import { translator } from '../../localization/translator';
|
||||
@@ -12,7 +11,7 @@ export interface ResolvedPlayer {
|
||||
id: number;
|
||||
}
|
||||
|
||||
export default async function resolvePlayerFromCommand(
|
||||
export async function resolvePlayerFromCommand(
|
||||
interaction: ChatInputCommandInteraction<CacheType>,
|
||||
) {
|
||||
const { t, translate } = translator(interaction.locale);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { ReadStream } from '@blitzkit/core';
|
||||
import AdmZip from 'adm-zip';
|
||||
import { readFile, writeFile } from 'fs/promises';
|
||||
import { Parser } from 'pickleparser';
|
||||
import protobuf from 'protobufjs';
|
||||
import { ReadStream } from '../../../../core/src/streams/buffer';
|
||||
|
||||
interface WotbReplayMetaJson {
|
||||
version: string;
|
||||
|
||||
Reference in new issue
Block a user