mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
fix: port to core 3
This commit is contained in:
1 parent
5e989a16bc
commit
de6a4d5675
29 files changed
+27
-20
No files matched your search
@@ -11,12 +11,12 @@ import {
|
|||||||
import { SlashCommandSubcommandBuilder } from 'discord.js';
|
import { SlashCommandSubcommandBuilder } from 'discord.js';
|
||||||
import markdownEscape from 'markdown-escape';
|
import markdownEscape from 'markdown-escape';
|
||||||
import { emblemURL } from '../../../website/src/core/blitzkit/emblemURL';
|
import { emblemURL } from '../../../website/src/core/blitzkit/emblemURL';
|
||||||
import { iconPng } from '../../../website/src/core/blitzkit/iconPng';
|
|
||||||
import { Glow } from '../components/AllStatsOverview/components/HeroStat/components/Glow';
|
import { Glow } from '../components/AllStatsOverview/components/HeroStat/components/Glow';
|
||||||
import { CommandWrapper } from '../components/CommandWrapper';
|
import { CommandWrapper } from '../components/CommandWrapper';
|
||||||
import { DeltaCaret } from '../components/DeltaCaret';
|
import { DeltaCaret } from '../components/DeltaCaret';
|
||||||
import { TitleBar } from '../components/TitleBar';
|
import { TitleBar } from '../components/TitleBar';
|
||||||
import { normalizeLeagueIcon } from '../core/blitz/normalizeLeagueIcon';
|
import { normalizeLeagueIcon } from '../core/blitz/normalizeLeagueIcon';
|
||||||
|
import { iconPng } from '../core/blitzkit/iconPng';
|
||||||
import { addUsernameChoices } from '../core/discord/addUsernameChoices';
|
import { addUsernameChoices } from '../core/discord/addUsernameChoices';
|
||||||
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
||||||
import { resolvePlayerFromCommand } from '../core/discord/resolvePlayerFromCommand';
|
import { resolvePlayerFromCommand } from '../core/discord/resolvePlayerFromCommand';
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ import {
|
|||||||
} from '@blitzkit/core';
|
} from '@blitzkit/core';
|
||||||
import { clamp } from 'lodash';
|
import { clamp } from 'lodash';
|
||||||
import { emblemURL } from '../../../website/src/core/blitzkit/emblemURL';
|
import { emblemURL } from '../../../website/src/core/blitzkit/emblemURL';
|
||||||
import { iconPng } from '../../../website/src/core/blitzkit/iconPng';
|
|
||||||
import { mapDefinitions } from '../../../website/src/core/blitzkit/mapDefinitions';
|
import { mapDefinitions } from '../../../website/src/core/blitzkit/mapDefinitions';
|
||||||
import { RenderConfiguration } from '../../../website/src/core/blitzkit/renderConfiguration';
|
|
||||||
import { CommandWrapper } from '../components/CommandWrapper';
|
import { CommandWrapper } from '../components/CommandWrapper';
|
||||||
import { TitleBar } from '../components/TitleBar';
|
import { TitleBar } from '../components/TitleBar';
|
||||||
|
import { iconPng } from '../core/blitzkit/iconPng';
|
||||||
|
import { RenderConfiguration } from '../core/blitzkit/renderConfiguration';
|
||||||
import { buttonLink } from '../core/discord/buttonLink';
|
import { buttonLink } from '../core/discord/buttonLink';
|
||||||
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
||||||
import { CommandRegistry } from '../events/interactionCreate';
|
import { CommandRegistry } from '../events/interactionCreate';
|
||||||
|
|||||||
@@ -11,12 +11,12 @@ import {
|
|||||||
import { escapeMarkdown, Locale } from 'discord.js';
|
import { escapeMarkdown, Locale } from 'discord.js';
|
||||||
import { buildTechTreeLine } from '../../../website/src/core/blitzkit/buildTechTreeLine';
|
import { buildTechTreeLine } from '../../../website/src/core/blitzkit/buildTechTreeLine';
|
||||||
import { emblemURL } from '../../../website/src/core/blitzkit/emblemURL';
|
import { emblemURL } from '../../../website/src/core/blitzkit/emblemURL';
|
||||||
import { iconPng } from '../../../website/src/core/blitzkit/iconPng';
|
|
||||||
import { resolveAncestry } from '../../../website/src/core/blitzkit/resolveAncestry';
|
import { resolveAncestry } from '../../../website/src/core/blitzkit/resolveAncestry';
|
||||||
import { tankIconPng } from '../../../website/src/core/blitzkit/tankIconPng';
|
import { tankIconPng } from '../../../website/src/core/blitzkit/tankIconPng';
|
||||||
import { CommandWrapper } from '../components/CommandWrapper';
|
import { CommandWrapper } from '../components/CommandWrapper';
|
||||||
import { TitleBar } from '../components/TitleBar';
|
import { TitleBar } from '../components/TitleBar';
|
||||||
import { resolveTankId } from '../core/blitz/resolveTankId';
|
import { resolveTankId } from '../core/blitz/resolveTankId';
|
||||||
|
import { iconPng } from '../core/blitzkit/iconPng';
|
||||||
import { addUsernameChoices } from '../core/discord/addUsernameChoices';
|
import { addUsernameChoices } from '../core/discord/addUsernameChoices';
|
||||||
import { autocompleteTanks } from '../core/discord/autocompleteTanks';
|
import { autocompleteTanks } from '../core/discord/autocompleteTanks';
|
||||||
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
||||||
|
|||||||
File renamed without changes.
@@ -1,5 +1,5 @@
|
|||||||
import { RenderConfiguration } from '../../../../website/src/core/blitzkit/renderConfiguration';
|
|
||||||
import { jsxToSvg } from './jsxToSvg';
|
import { jsxToSvg } from './jsxToSvg';
|
||||||
|
import { RenderConfiguration } from './renderConfiguration';
|
||||||
import { svgToPngThreaded } from './svgToPngThreaded';
|
import { svgToPngThreaded } from './svgToPngThreaded';
|
||||||
|
|
||||||
export async function jsxToPngThreaded(
|
export async function jsxToPngThreaded(
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { readFile } from 'fs/promises';
|
import { readFile } from 'fs/promises';
|
||||||
import satori from 'satori';
|
import satori from 'satori';
|
||||||
import { RenderConfiguration } from '../../../../../website/src/core/blitzkit/renderConfiguration';
|
import { RenderConfiguration } from '../renderConfiguration';
|
||||||
import robotoBlack from './Roboto-Black.ttf';
|
import robotoBlack from './Roboto-Black.ttf';
|
||||||
import robotoBold from './Roboto-Bold.ttf';
|
import robotoBold from './Roboto-Bold.ttf';
|
||||||
import roboto from './Roboto.ttf';
|
import roboto from './Roboto.ttf';
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
@@ -7,10 +7,10 @@ import {
|
|||||||
InteractionReplyOptions,
|
InteractionReplyOptions,
|
||||||
MessageEditOptions,
|
MessageEditOptions,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import { RenderConfiguration } from '../../../../website/src/core/blitzkit/renderConfiguration';
|
|
||||||
import { InteractionReturnable } from '../../events/interactionCreate';
|
import { InteractionReturnable } from '../../events/interactionCreate';
|
||||||
import { Writeable } from '../../types/writable';
|
import { Writeable } from '../../types/writable';
|
||||||
import { jsxToPngThreaded } from '../blitzkit/jsxToPngThreaded';
|
import { jsxToPngThreaded } from '../blitzkit/jsxToPngThreaded';
|
||||||
|
import { RenderConfiguration } from '../blitzkit/renderConfiguration';
|
||||||
|
|
||||||
export async function normalizeInteractionReturnable(
|
export async function normalizeInteractionReturnable(
|
||||||
returnable: InteractionReturnable,
|
returnable: InteractionReturnable,
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import {
|
|||||||
SlashCommandOptionsOnlyBuilder,
|
SlashCommandOptionsOnlyBuilder,
|
||||||
SlashCommandSubcommandsOnlyBuilder,
|
SlashCommandSubcommandsOnlyBuilder,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import { RenderConfiguration } from '../../../../website/src/core/blitzkit/renderConfiguration';
|
|
||||||
import { aboutCommand } from '../../commands/about';
|
import { aboutCommand } from '../../commands/about';
|
||||||
import { breakdownCommand } from '../../commands/breakdown';
|
import { breakdownCommand } from '../../commands/breakdown';
|
||||||
import { debugCommand } from '../../commands/debug';
|
import { debugCommand } from '../../commands/debug';
|
||||||
@@ -34,6 +33,7 @@ import { searchClansCommand } from '../../commands/searchClans';
|
|||||||
import { searchPlayersCommand } from '../../commands/searchPlayers';
|
import { searchPlayersCommand } from '../../commands/searchPlayers';
|
||||||
import { statsCommand } from '../../commands/stats';
|
import { statsCommand } from '../../commands/stats';
|
||||||
import { todayCommand } from '../../commands/today';
|
import { todayCommand } from '../../commands/today';
|
||||||
|
import { RenderConfiguration } from '../../core/blitzkit/renderConfiguration';
|
||||||
import { handleAutocomplete } from './handlers/autocomplete';
|
import { handleAutocomplete } from './handlers/autocomplete';
|
||||||
import { handleButton } from './handlers/button';
|
import { handleButton } from './handlers/button';
|
||||||
import { handleChatInputCommand } from './handlers/chatInputCommand';
|
import { handleChatInputCommand } from './handlers/chatInputCommand';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { assertSecret, EventManager, Region } from '@blitzkit/core';
|
import { assertSecret, EventManager, Region } from '@blitzkit/core';
|
||||||
import { patientFetch } from '../../../website/src/core/blitzkit/patientFetch';
|
import { patientFetch } from '../blitzkit/patientFetch';
|
||||||
|
|
||||||
const RETRY_ERRORS = ['REQUEST_LIMIT_EXCEEDED', 'SOURCE_NOT_AVAILABLE'];
|
const RETRY_ERRORS = ['REQUEST_LIMIT_EXCEEDED', 'SOURCE_NOT_AVAILABLE'];
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { RatingInfo, Region } from '@blitzkit/core';
|
import { RatingInfo, Region } from '@blitzkit/core';
|
||||||
import { patientFetch } from '../../../website/src/core/blitzkit/patientFetch';
|
|
||||||
import { context } from '../blitzkit/context';
|
import { context } from '../blitzkit/context';
|
||||||
|
import { patientFetch } from '../blitzkit/patientFetch';
|
||||||
import { regionToRegionSubdomain } from './regionToRegionSubdomain';
|
import { regionToRegionSubdomain } from './regionToRegionSubdomain';
|
||||||
|
|
||||||
const cache: Partial<Record<Region, RatingInfo>> = {};
|
const cache: Partial<Record<Region, RatingInfo>> = {};
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { LeagueTop, RatingPlayer, Region } from '@blitzkit/core';
|
import { LeagueTop, RatingPlayer, Region } from '@blitzkit/core';
|
||||||
import { patientFetch } from '../../../website/src/core/blitzkit/patientFetch';
|
|
||||||
import { context } from '../blitzkit/context';
|
import { context } from '../blitzkit/context';
|
||||||
|
import { patientFetch } from '../blitzkit/patientFetch';
|
||||||
import { regionToRegionSubdomain } from './regionToRegionSubdomain';
|
import { regionToRegionSubdomain } from './regionToRegionSubdomain';
|
||||||
|
|
||||||
export async function getRatingLeague(
|
export async function getRatingLeague(
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { RatingNeighbors, Region } from '@blitzkit/core';
|
import { RatingNeighbors, Region } from '@blitzkit/core';
|
||||||
import { patientFetch } from '../../../website/src/core/blitzkit/patientFetch';
|
import { patientFetch } from '../blitzkit/patientFetch';
|
||||||
import { withCORSProxy } from '../../../website/src/core/blitzkit/withCORSProxy';
|
import { withCORSProxy } from '../blitzkit/withCORSProxy';
|
||||||
import { regionToRegionSubdomain } from './regionToRegionSubdomain';
|
import { regionToRegionSubdomain } from './regionToRegionSubdomain';
|
||||||
|
|
||||||
export async function getRatingNeighbors(
|
export async function getRatingNeighbors(
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -9,18 +9,28 @@ export * from './consumableDefinitions';
|
|||||||
export * from './context';
|
export * from './context';
|
||||||
export * from './createDefaultSkills';
|
export * from './createDefaultSkills';
|
||||||
export * from './degressiveStat';
|
export * from './degressiveStat';
|
||||||
|
export * from './discoveredIdDefinitions';
|
||||||
|
export * from './emblemURL';
|
||||||
export * from './equipmentDefinitions';
|
export * from './equipmentDefinitions';
|
||||||
export * from './eventManager';
|
export * from './eventManager';
|
||||||
export * from './fetchCdonLz4';
|
export * from './fetchCdonLz4';
|
||||||
export * from './filterTank';
|
export * from './filterTank';
|
||||||
|
export * from './flagUserActivity';
|
||||||
export * from './gameDefinitions';
|
export * from './gameDefinitions';
|
||||||
export * from './getArchivedLatestSeasonNumber';
|
export * from './getArchivedLatestSeasonNumber';
|
||||||
export * from './getArchivedRatingInfo';
|
export * from './getArchivedRatingInfo';
|
||||||
export * from './getArchivedRatingLeaderboard';
|
export * from './getArchivedRatingLeaderboard';
|
||||||
export * from './getArchivedRatingMidnightLeaderboard';
|
export * from './getArchivedRatingMidnightLeaderboard';
|
||||||
|
export * from './getTimeDaysAgo';
|
||||||
export * from './isExplosive';
|
export * from './isExplosive';
|
||||||
|
export * from './linkBlitzAndDiscord';
|
||||||
|
export * from './mapDefinitions';
|
||||||
export * from './modelDefinitions';
|
export * from './modelDefinitions';
|
||||||
export * from './normalizeBoundingBox';
|
export * from './normalizeBoundingBox';
|
||||||
|
export * from './octokit';
|
||||||
|
export * from './parseBkni';
|
||||||
|
export * from './patientFetch';
|
||||||
|
export * from './patientFetchJSON';
|
||||||
export * from './progressiveStat';
|
export * from './progressiveStat';
|
||||||
export * from './provisionDefinitions';
|
export * from './provisionDefinitions';
|
||||||
export * from './resolveDpm';
|
export * from './resolveDpm';
|
||||||
@@ -36,5 +46,7 @@ export * from './tankIcon';
|
|||||||
export * from './tankNames';
|
export * from './tankNames';
|
||||||
export * from './unionBoundingBox';
|
export * from './unionBoundingBox';
|
||||||
export * from './uniqueGuns';
|
export * from './uniqueGuns';
|
||||||
|
export * from './unwrapBlitzkitResponse';
|
||||||
export * from './votes';
|
export * from './votes';
|
||||||
|
export * from './withCORSProxy';
|
||||||
export * from './youtubers';
|
export * from './youtubers';
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { BlitzkitResponse } from '../../hooks/useTankVotes';
|
import { BlitzkitResponse } from '../../../website/src/hooks/useTankVotes';
|
||||||
|
|
||||||
export function unwrapBlitzkitResponse<Data>(response: BlitzkitResponse<Data>) {
|
export function unwrapBlitzkitResponse<Data>(response: BlitzkitResponse<Data>) {
|
||||||
if (response.status === 'error') {
|
if (response.status === 'error') {
|
||||||
File renamed without changes.
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.json",
|
||||||
"include": ["src/**/*"]
|
"include": ["src/**/*", "../bot/src/core/blitzkit/tankIconPng.ts"]
|
||||||
}
|
}
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
export function isLocalhost() {
|
|
||||||
return (
|
|
||||||
typeof window !== 'undefined' && window.location.hostname === 'localhost'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
Reference in new issue
Block a user