mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +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 markdownEscape from 'markdown-escape';
|
||||
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 { CommandWrapper } from '../components/CommandWrapper';
|
||||
import { DeltaCaret } from '../components/DeltaCaret';
|
||||
import { TitleBar } from '../components/TitleBar';
|
||||
import { normalizeLeagueIcon } from '../core/blitz/normalizeLeagueIcon';
|
||||
import { iconPng } from '../core/blitzkit/iconPng';
|
||||
import { addUsernameChoices } from '../core/discord/addUsernameChoices';
|
||||
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
||||
import { resolvePlayerFromCommand } from '../core/discord/resolvePlayerFromCommand';
|
||||
|
||||
@@ -9,11 +9,11 @@ import {
|
||||
} from '@blitzkit/core';
|
||||
import { clamp } from 'lodash';
|
||||
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 { RenderConfiguration } from '../../../website/src/core/blitzkit/renderConfiguration';
|
||||
import { CommandWrapper } from '../components/CommandWrapper';
|
||||
import { TitleBar } from '../components/TitleBar';
|
||||
import { iconPng } from '../core/blitzkit/iconPng';
|
||||
import { RenderConfiguration } from '../core/blitzkit/renderConfiguration';
|
||||
import { buttonLink } from '../core/discord/buttonLink';
|
||||
import { createLocalizedCommand } from '../core/discord/createLocalizedCommand';
|
||||
import { CommandRegistry } from '../events/interactionCreate';
|
||||
|
||||
@@ -11,12 +11,12 @@ import {
|
||||
import { escapeMarkdown, Locale } from 'discord.js';
|
||||
import { buildTechTreeLine } from '../../../website/src/core/blitzkit/buildTechTreeLine';
|
||||
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 { tankIconPng } from '../../../website/src/core/blitzkit/tankIconPng';
|
||||
import { CommandWrapper } from '../components/CommandWrapper';
|
||||
import { TitleBar } from '../components/TitleBar';
|
||||
import { resolveTankId } from '../core/blitz/resolveTankId';
|
||||
import { iconPng } from '../core/blitzkit/iconPng';
|
||||
import { addUsernameChoices } from '../core/discord/addUsernameChoices';
|
||||
import { autocompleteTanks } from '../core/discord/autocompleteTanks';
|
||||
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 { RenderConfiguration } from './renderConfiguration';
|
||||
import { svgToPngThreaded } from './svgToPngThreaded';
|
||||
|
||||
export async function jsxToPngThreaded(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { readFile } from 'fs/promises';
|
||||
import satori from 'satori';
|
||||
import { RenderConfiguration } from '../../../../../website/src/core/blitzkit/renderConfiguration';
|
||||
import { RenderConfiguration } from '../renderConfiguration';
|
||||
import robotoBlack from './Roboto-Black.ttf';
|
||||
import robotoBold from './Roboto-Bold.ttf';
|
||||
import roboto from './Roboto.ttf';
|
||||
|
||||
File renamed without changes.
File renamed without changes.
@@ -7,10 +7,10 @@ import {
|
||||
InteractionReplyOptions,
|
||||
MessageEditOptions,
|
||||
} from 'discord.js';
|
||||
import { RenderConfiguration } from '../../../../website/src/core/blitzkit/renderConfiguration';
|
||||
import { InteractionReturnable } from '../../events/interactionCreate';
|
||||
import { Writeable } from '../../types/writable';
|
||||
import { jsxToPngThreaded } from '../blitzkit/jsxToPngThreaded';
|
||||
import { RenderConfiguration } from '../blitzkit/renderConfiguration';
|
||||
|
||||
export async function normalizeInteractionReturnable(
|
||||
returnable: InteractionReturnable,
|
||||
|
||||
@@ -14,7 +14,6 @@ import {
|
||||
SlashCommandOptionsOnlyBuilder,
|
||||
SlashCommandSubcommandsOnlyBuilder,
|
||||
} from 'discord.js';
|
||||
import { RenderConfiguration } from '../../../../website/src/core/blitzkit/renderConfiguration';
|
||||
import { aboutCommand } from '../../commands/about';
|
||||
import { breakdownCommand } from '../../commands/breakdown';
|
||||
import { debugCommand } from '../../commands/debug';
|
||||
@@ -34,6 +33,7 @@ import { searchClansCommand } from '../../commands/searchClans';
|
||||
import { searchPlayersCommand } from '../../commands/searchPlayers';
|
||||
import { statsCommand } from '../../commands/stats';
|
||||
import { todayCommand } from '../../commands/today';
|
||||
import { RenderConfiguration } from '../../core/blitzkit/renderConfiguration';
|
||||
import { handleAutocomplete } from './handlers/autocomplete';
|
||||
import { handleButton } from './handlers/button';
|
||||
import { handleChatInputCommand } from './handlers/chatInputCommand';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
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'];
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { RatingInfo, Region } from '@blitzkit/core';
|
||||
import { patientFetch } from '../../../website/src/core/blitzkit/patientFetch';
|
||||
import { context } from '../blitzkit/context';
|
||||
import { patientFetch } from '../blitzkit/patientFetch';
|
||||
import { regionToRegionSubdomain } from './regionToRegionSubdomain';
|
||||
|
||||
const cache: Partial<Record<Region, RatingInfo>> = {};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { LeagueTop, RatingPlayer, Region } from '@blitzkit/core';
|
||||
import { patientFetch } from '../../../website/src/core/blitzkit/patientFetch';
|
||||
import { context } from '../blitzkit/context';
|
||||
import { patientFetch } from '../blitzkit/patientFetch';
|
||||
import { regionToRegionSubdomain } from './regionToRegionSubdomain';
|
||||
|
||||
export async function getRatingLeague(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { RatingNeighbors, Region } from '@blitzkit/core';
|
||||
import { patientFetch } from '../../../website/src/core/blitzkit/patientFetch';
|
||||
import { withCORSProxy } from '../../../website/src/core/blitzkit/withCORSProxy';
|
||||
import { patientFetch } from '../blitzkit/patientFetch';
|
||||
import { withCORSProxy } from '../blitzkit/withCORSProxy';
|
||||
import { regionToRegionSubdomain } from './regionToRegionSubdomain';
|
||||
|
||||
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 './createDefaultSkills';
|
||||
export * from './degressiveStat';
|
||||
export * from './discoveredIdDefinitions';
|
||||
export * from './emblemURL';
|
||||
export * from './equipmentDefinitions';
|
||||
export * from './eventManager';
|
||||
export * from './fetchCdonLz4';
|
||||
export * from './filterTank';
|
||||
export * from './flagUserActivity';
|
||||
export * from './gameDefinitions';
|
||||
export * from './getArchivedLatestSeasonNumber';
|
||||
export * from './getArchivedRatingInfo';
|
||||
export * from './getArchivedRatingLeaderboard';
|
||||
export * from './getArchivedRatingMidnightLeaderboard';
|
||||
export * from './getTimeDaysAgo';
|
||||
export * from './isExplosive';
|
||||
export * from './linkBlitzAndDiscord';
|
||||
export * from './mapDefinitions';
|
||||
export * from './modelDefinitions';
|
||||
export * from './normalizeBoundingBox';
|
||||
export * from './octokit';
|
||||
export * from './parseBkni';
|
||||
export * from './patientFetch';
|
||||
export * from './patientFetchJSON';
|
||||
export * from './progressiveStat';
|
||||
export * from './provisionDefinitions';
|
||||
export * from './resolveDpm';
|
||||
@@ -36,5 +46,7 @@ export * from './tankIcon';
|
||||
export * from './tankNames';
|
||||
export * from './unionBoundingBox';
|
||||
export * from './uniqueGuns';
|
||||
export * from './unwrapBlitzkitResponse';
|
||||
export * from './votes';
|
||||
export * from './withCORSProxy';
|
||||
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>) {
|
||||
if (response.status === 'error') {
|
||||
File renamed without changes.
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"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