#Option based on the Choice [SlashCommands]

1 messages · Page 1 of 1 (latest)

cunning oak

Is it possible that the "side" option only appears for the user if he chooses the "Coinflip" choice? Like if he chooses the slots choice the side option is not avaible

    new SlashCommandBuilder().setName('gamble').setDescription('Gamble with your money')
    .addStringOption(option =>
      option.setName('game')
        .setDescription('Choose a game to play')
        .setRequired(true)
        .addChoices(
          { name: 'Slots', value: 'slots' },
          { name: 'Coinflip', value: 'coinflip' }
        ))
        .addIntegerOption(option =>
          option.setName('coins')
          .setDescription('How many coins you want to play with')
          .setRequired(true)
        .addStringOption(option =>
          option.setName('side')
            .setDescription('The side you want to bet on.')
            .addChoice('Heads', 'heads')
            .addChoice('Tails', 'tails')
            .setRequired(true)),

Or could anyone find a different method how I can do this whole gamble section without spamming my commands with all games