feat: extracted sub command groups

This commit is contained in:
TresAbhi committed 2023-06-21 01:57:27 +00:00
1 parent 70145abe86
commit 3e8e198c88
4 files changed
+41 -52

No files matched your search

@@ -0,0 +1,24 @@
import { SlashCommandBuilder } from 'discord.js';
import addPeriodSubCommands from './addPeriodSubCommands.js';
import addTankChoices from './addTankChoices.js';
import addUsernameOption from './addUsernameOption.js';
export default function addStatsSubCommandGroups(option: SlashCommandBuilder) {
return option
.addSubcommandGroup((option) =>
addPeriodSubCommands(option, (option) =>
option.addStringOption(addUsernameOption),
)
.setName('player')
.setDescription("Player's statistics"),
)
.addSubcommandGroup((option) =>
addPeriodSubCommands(option, (option) =>
option
.addStringOption(addTankChoices)
.addStringOption(addUsernameOption),
)
.setName('tank')
.setDescription("Tank's statistics"),
);
}