-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
Anyways given the basic example below If the user selects Foo for option_one I would like it so they can only pick up to Two for option_two, and then if Bar is selected I would allow up to Four. module.exports = { data: new SlashCommandBuilder() .setName('name') .setDescription('desc') .addStringOption(option => option.setName('option_one') .setDescription('') .setRequired(true) .addChoices( {name: 'Foo', value: 'Foo'}, {name: 'Bar', value: 'Bar'} ) ) .addStringOption(option => option.setName('number') .setDescription('option_two') .setRequired(true) .addChoices( {name: 'One', value: '1'}, {name: 'Two', value: '2'}, {name: 'Three', value: '3'}, {name: 'Four', value: '4'} ) ), async execute(interaction) { console.log(interaction.options) const exampleEmbed = new EmbedBuilder() .setColor(0x0099FF) .setTitle(`${interaction.user.username} wants ${interaction.options.getString('option_one')}`) .setAuthor({ name: 'djs', iconURL: 'https://i.imgur.com/AfFp7pu.png', url: 'https://discord.js.org' }) .setTimestamp() .setFooter({ text: `${interaction.options.getString('option_two')}`, iconURL: 'https://i.imgur.com/AfFp7pu.png' }); await interaction.reply({ embeds: [exampleEmbed] }); }, }; Hopefully someone can tell me if I am wasting my time trying to do this if its not possible or point me in the direction of a solution. Thanks in advance!