public override registerApplicationCommands(registry: Subcommand.Registry) {
registry.registerChatInputCommand(
new SlashCommandBuilder() //
.setName(CommandName.Admin) //
.setDescription('Administrative commands.')
.setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild)
.addSubcommandGroup(
new SlashCommandSubcommandGroupBuilder() //
.setName(CommandName.AdminMines)
.setDescription('Administrative commands related to the mines game.')
.addSubcommand(
new SlashCommandSubcommandBuilder() //
.setName(CommandName.AdminMinesStressTest)
.setDescription('Initializes a stress test in the specified channel.')
.addChannelOption(
new SlashCommandChannelOption() //
.setName(CommandParameterName.Channel)
.addChannelTypes(...this._minesGameStressTestChannelTypes)
.setDescription('The channel in which to run the stress test.')
.setRequired(true)
)
.addIntegerOption(
new SlashCommandIntegerOption() //
.setName(CommandParameterName.GameCount)
.setDescription('The amount of games to simulate.')
.setMinValue(1)
.setMaxValue(100)
.setRequired(true)
)
)
),
)
public override registerApplicationCommands(registry: Subcommand.Registry) {
registry.registerChatInputCommand(
new SlashCommandBuilder() //
.setName(CommandName.Admin) //
.setDescription('Administrative commands.')
.setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild)
.addSubcommandGroup(
new SlashCommandSubcommandGroupBuilder() //
.setName(CommandName.AdminMines)
.setDescription('Administrative commands related to the mines game.')
.addSubcommand(
new SlashCommandSubcommandBuilder() //
.setName(CommandName.AdminMinesStressTest)
.setDescription('Initializes a stress test in the specified channel.')
.addChannelOption(
new SlashCommandChannelOption() //
.setName(CommandParameterName.Channel)
.addChannelTypes(...this._minesGameStressTestChannelTypes)
.setDescription('The channel in which to run the stress test.')
.setRequired(true)
)
.addIntegerOption(
new SlashCommandIntegerOption() //
.setName(CommandParameterName.GameCount)
.setDescription('The amount of games to simulate.')
.setMinValue(1)
.setMaxValue(100)
.setRequired(true)
)
)
),
)