Help: Are Dynamic SlashCommand choices possible?

This page summarizes the projects mentioned and recommended in the original post on /r/Discordjs

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.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • discord.js

    A powerful JavaScript library for interacting with the Discord API

  • 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!

  • 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.

    SurveyJS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Need help (again)

    1 project | /r/discordbots | 19 Jun 2023
  • Is there a way to identify super reactions?

    1 project | /r/Discordjs | 26 May 2023
  • Bot to send messages/auto messages as another user? For an RP server.

    1 project | /r/discordapp | 23 Apr 2023
  • Version

    1 project | /r/Discordjs | 20 Apr 2023
  • Kenku FM stops playing audio every minute, and I have to move it from vc for it to resume

    1 project | /r/OwlbearRodeo | 1 Mar 2023