onInteractionCreate doesn't get called when I select a previously deselected parameter
I have a command that has 2 autocomplete parameters:
By default it pops up the
org
as an option which works fine, but if I press backspace and delete this suggestion I can select other parameters. In my case I selected team
, and proceeded to select a team
. After that when I select org
from the parameters I get displayed the previous suggestions. My problem is that I have some code that filters organizations if a team is selected:
This works if the user starts to type something, but the whole InteractionCreate
callback doesn't get called when I simply select org
, the old list is displayed instead. How can I force the reloading of the organizations that the user can pick? I'd like to use autocomplete as it is possible that there are many organizations / teams to choose from.5 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!Looks like this
is this the expected behavior?
Or is there a best practice that I can employ here if the possible values in my fields depend on values selected in other fields?
That's how Discord's client caching works. Not related to discord.js.
You can vote for this feedback btw