mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
feat: infrastructure for ownedtanks columns
This commit is contained in:
1 parent
2258b0f936
commit
57271e3c23
19 files changed
+24
-18
No files matched your search
@@ -11,3 +11,4 @@ commands.txt
|
||||
/test.*
|
||||
/docs/.vitepress/dist
|
||||
/docs/.vitepress/cache
|
||||
servers.csv
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "blitzkrieg",
|
||||
"version": "1.9.4",
|
||||
"version": "1.10.0",
|
||||
"description": "",
|
||||
"main": "src/server.ts",
|
||||
"type": "module",
|
||||
|
||||
@@ -12,7 +12,7 @@ const executionStart = new Date().getTime();
|
||||
|
||||
export const debugCommand: CommandRegistry = {
|
||||
inProduction: true,
|
||||
inDevelopment: true,
|
||||
inDevelopment: false,
|
||||
inPublic: true,
|
||||
|
||||
command: new SlashCommandBuilder()
|
||||
|
||||
@@ -26,7 +26,7 @@ export const SKILLED_CLANS: Record<SkilledClan, string> = {
|
||||
|
||||
export const eligibleCommand: CommandRegistry = {
|
||||
inProduction: true,
|
||||
inDevelopment: true,
|
||||
inDevelopment: false,
|
||||
inPublic: false,
|
||||
|
||||
command: new SlashCommandBuilder()
|
||||
|
||||
@@ -20,7 +20,7 @@ import { AccountInfo } from '../types/accountInfo.js';
|
||||
|
||||
export const evolutionCommand: CommandRegistry = {
|
||||
inProduction: true,
|
||||
inDevelopment: true,
|
||||
inDevelopment: false,
|
||||
inPublic: true,
|
||||
|
||||
command: addStatTypeSubCommandGroups(
|
||||
@@ -36,7 +36,8 @@ export const evolutionCommand: CommandRegistry = {
|
||||
const player = await resolvePlayerFromCommand(interaction);
|
||||
const period = resolvePeriodFromCommand(interaction);
|
||||
const tankIdRaw = interaction.options.getString('tank')!;
|
||||
const tankId = commandGroup === 'tank' ? await resolveTankId(tankIdRaw) : null;
|
||||
const tankId =
|
||||
commandGroup === 'tank' ? await resolveTankId(tankIdRaw) : null;
|
||||
const start = interaction.options.getInteger('start');
|
||||
const end = interaction.options.getInteger('end');
|
||||
const { nickname } = (
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
|
||||
export const helpCommand: CommandRegistry = {
|
||||
inProduction: true,
|
||||
inDevelopment: true,
|
||||
inDevelopment: false,
|
||||
inPublic: true,
|
||||
|
||||
command: new SlashCommandBuilder()
|
||||
|
||||
@@ -18,7 +18,7 @@ const DEFAULT_THRESHOLD = 7;
|
||||
|
||||
export const inactiveCommand: CommandRegistry = {
|
||||
inProduction: true,
|
||||
inDevelopment: true,
|
||||
inDevelopment: false,
|
||||
inPublic: true,
|
||||
|
||||
command: new SlashCommandBuilder()
|
||||
|
||||
@@ -89,6 +89,10 @@ export const ownedTanksCommand: CommandRegistry = {
|
||||
const clanData = await getWargamingResponse<PlayerClanData>(
|
||||
`https://api.wotblitz.${server}/wotb/clans/accountinfo/?application_id=${WARGAMING_APPLICATION_ID}&account_id=${id}&extra=clan`,
|
||||
);
|
||||
const leftColumnSize = Math.ceil(tanks.length / 2);
|
||||
const rightColumnSize = tanks.length - leftColumnSize;
|
||||
const leftColumn = tanks.slice(0, leftColumnSize);
|
||||
const rightColumn = tanks.slice(leftColumnSize);
|
||||
|
||||
return (
|
||||
<Wrapper>
|
||||
|
||||
@@ -3,7 +3,7 @@ import { CommandRegistry } from '../events/interactionCreate/index.js';
|
||||
|
||||
export const pingCommand: CommandRegistry<true> = {
|
||||
inProduction: true,
|
||||
inDevelopment: true,
|
||||
inDevelopment: false,
|
||||
inPublic: true,
|
||||
handlesInteraction: true,
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ type SortBy = 'name' | 'count';
|
||||
|
||||
export const playerAchievementsCommand: CommandRegistry = {
|
||||
inProduction: true,
|
||||
inDevelopment: true,
|
||||
inDevelopment: false,
|
||||
inPublic: true,
|
||||
|
||||
command: new SlashCommandBuilder()
|
||||
|
||||
@@ -12,7 +12,7 @@ import { AccountInfo } from '../types/accountInfo.js';
|
||||
|
||||
export const playerInfoCommand: CommandRegistry = {
|
||||
inProduction: true,
|
||||
inDevelopment: true,
|
||||
inDevelopment: false,
|
||||
inPublic: true,
|
||||
|
||||
command: new SlashCommandBuilder()
|
||||
|
||||
@@ -11,7 +11,7 @@ import { ClanList } from '../types/clanList.js';
|
||||
|
||||
export const searchClansCommand: CommandRegistry = {
|
||||
inProduction: true,
|
||||
inDevelopment: true,
|
||||
inDevelopment: false,
|
||||
inPublic: true,
|
||||
|
||||
command: new SlashCommandBuilder()
|
||||
|
||||
@@ -12,7 +12,7 @@ import { AccountList } from '../types/accountList.js';
|
||||
|
||||
export const searchPlayersCommand: CommandRegistry = {
|
||||
inProduction: true,
|
||||
inDevelopment: true,
|
||||
inDevelopment: false,
|
||||
inPublic: true,
|
||||
|
||||
command: new SlashCommandBuilder()
|
||||
|
||||
@@ -8,7 +8,7 @@ import { CommandRegistry } from '../events/interactionCreate/index.js';
|
||||
|
||||
export const searchTanksCommand: CommandRegistry = {
|
||||
inProduction: true,
|
||||
inDevelopment: true,
|
||||
inDevelopment: false,
|
||||
inPublic: true,
|
||||
|
||||
command: new SlashCommandBuilder()
|
||||
|
||||
@@ -20,7 +20,7 @@ import { AccountInfo } from '../types/accountInfo.js';
|
||||
|
||||
export const statsCommand: CommandRegistry = {
|
||||
inProduction: true,
|
||||
inDevelopment: true,
|
||||
inDevelopment: false,
|
||||
inPublic: true,
|
||||
|
||||
command: addStatTypeSubCommandGroups(
|
||||
|
||||
@@ -19,7 +19,7 @@ import { AccountInfo } from '../types/accountInfo.js';
|
||||
|
||||
export const statsFullCommand: CommandRegistry = {
|
||||
inProduction: true,
|
||||
inDevelopment: true,
|
||||
inDevelopment: false,
|
||||
inPublic: true,
|
||||
|
||||
command: addStatTypeSubCommandGroups(
|
||||
|
||||
@@ -14,7 +14,7 @@ import { AccountInfo } from '../types/accountInfo.js';
|
||||
|
||||
export const todayCommand: CommandRegistry = {
|
||||
inProduction: true,
|
||||
inDevelopment: true,
|
||||
inDevelopment: false,
|
||||
inPublic: true,
|
||||
|
||||
command: new SlashCommandBuilder()
|
||||
|
||||
@@ -14,7 +14,7 @@ import { PlayerClanData } from '../types/playerClanData.js';
|
||||
|
||||
export const verifyCommand: CommandRegistry = {
|
||||
inProduction: true,
|
||||
inDevelopment: true,
|
||||
inDevelopment: false,
|
||||
inPublic: true,
|
||||
|
||||
command: new SlashCommandBuilder()
|
||||
|
||||
@@ -6,7 +6,7 @@ import { RouteRegistry } from '../server.js';
|
||||
export const statsRoute: RouteRegistry = {
|
||||
route: '/stats/:type/:period',
|
||||
inProduction: true,
|
||||
inDevelopment: true,
|
||||
inDevelopment: false,
|
||||
|
||||
async handler(req) {
|
||||
const type = req.params.type as StatType;
|
||||
|
||||
Reference in new issue
Block a user