From d2319688a531bacfec3c7e9f7b15c0e9e81a6c29 Mon Sep 17 00:00:00 2001 From: tresabhi Date: Wed, 9 Aug 2023 17:25:05 +0000 Subject: [PATCH] fix: removed multi-tank from evolution --- src/commands/evolution.tsx | 1 + src/core/discord/addStatTypeSubCommandGroups.ts | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/commands/evolution.tsx b/src/commands/evolution.tsx index 797fdb002..31c4db287 100644 --- a/src/commands/evolution.tsx +++ b/src/commands/evolution.tsx @@ -24,6 +24,7 @@ export const evolutionCommand = new Promise( new SlashCommandBuilder() .setName('evolution') .setDescription('Evolution of statistics'), + false, ); resolve({ diff --git a/src/core/discord/addStatTypeSubCommandGroups.ts b/src/core/discord/addStatTypeSubCommandGroups.ts index e182d0ad8..06ad4f0d2 100644 --- a/src/core/discord/addStatTypeSubCommandGroups.ts +++ b/src/core/discord/addStatTypeSubCommandGroups.ts @@ -8,10 +8,11 @@ import addUsernameChoices from './addUsernameChoices'; export default async function addStatTypeSubCommandGroups( option: SlashCommandBuilder, + addMultiTank = true, ) { const awaitedTankopediaInfo = await tankopediaInfo; - return option + option .addSubcommandGroup((option) => addPeriodSubCommands(option, (option) => option.addStringOption(addUsernameChoices), @@ -27,8 +28,10 @@ export default async function addStatTypeSubCommandGroups( ) .setName('tank' satisfies StatType) .setDescription('Tank statistics'), - ) - .addSubcommandGroup((option) => + ); + + if (addMultiTank) + option.addSubcommandGroup((option) => addPeriodSubCommands(option, (option) => option .addStringOption(addUsernameChoices) @@ -87,4 +90,6 @@ export default async function addStatTypeSubCommandGroups( .setName('multi-tank' satisfies StatType) .setDescription('Multiple tanks'), ); + + return option; }