mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-29 21:49:50 +01:00
feat: fixed choices for owned tanks tier
This commit is contained in:
1 parent
4d9dc067af
commit
f6480ad66f
1 file changed
+14
-4
@@ -46,18 +46,28 @@ export default {
|
|||||||
command: new SlashCommandBuilder()
|
command: new SlashCommandBuilder()
|
||||||
.setName(cmdName('ownedtanks'))
|
.setName(cmdName('ownedtanks'))
|
||||||
.setDescription("Shows a player's owned tanks")
|
.setDescription("Shows a player's owned tanks")
|
||||||
.addIntegerOption((option) =>
|
.addStringOption((option) =>
|
||||||
option
|
option
|
||||||
.setName('tier')
|
.setName('tier')
|
||||||
.setDescription('The tier you want to see')
|
.setDescription('The tier you want to see')
|
||||||
.setMinValue(1)
|
.setChoices(
|
||||||
.setMaxValue(10)
|
{ name: 'Tier I', value: '1' },
|
||||||
|
{ name: 'Tier II', value: '2' },
|
||||||
|
{ name: 'Tier III', value: '3' },
|
||||||
|
{ name: 'Tier IV', value: '4' },
|
||||||
|
{ name: 'Tier V', value: '5' },
|
||||||
|
{ name: 'Tier VI', value: '6' },
|
||||||
|
{ name: 'Tier VII', value: '7' },
|
||||||
|
{ name: 'Tier VIII', value: '8' },
|
||||||
|
{ name: 'Tier IX', value: '9' },
|
||||||
|
{ name: 'Tier X', value: '10' },
|
||||||
|
)
|
||||||
.setRequired(true),
|
.setRequired(true),
|
||||||
)
|
)
|
||||||
.addStringOption(addUsernameOption),
|
.addStringOption(addUsernameOption),
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
const tier = interaction.options.getInteger('tier')!;
|
const tier = Number(interaction.options.getString('tier'));
|
||||||
const account = await getBlitzAccount(interaction);
|
const account = await getBlitzAccount(interaction);
|
||||||
const { id, server } = account;
|
const { id, server } = account;
|
||||||
const accountInfo = await getWargamingResponse<AccountInfo>(
|
const accountInfo = await getWargamingResponse<AccountInfo>(
|
||||||
|
|||||||
Reference in new issue
Block a user