Setting autocomplete options based on other option's value

I'm trying to make it so one autocomplete option (
type
)'s choices are based on the value of another option (category) within the same command.

When I first set the value of category
  • which is a non-autocomplete string choice option - and I move to the autocomplete option
    type
    it successfully populates its choices according to the value of category. However, when I go back and change the value of category to something else, then move to the
    type
    option, the proper corresponding choices only populate correctly if I type at least one letter. If I do not, it populates it with the previously set of choices, corresponding to the first value set for category.
've attached a GIF that will hopefully help understand my issue. Thank you!

discord.js@14.11.0 node v18.16.0
Animation.gif
Was this page helpful?