How do I use autocompleteRun on subcommands?
^ As the title says. I can't seem to figure out how subcommands can have autocompleteRun implemented. I'm not too worried about duplicates, since there is only one subcommand that uses autocomplete.
Solution:Jump to solution
Doesn't matter. You still just do
```ts
public override autocompleteRun(interaction: AutocompleteInteraction) {
const subcommand = interaction.options.getSubcommand();
if (subcommand.name === 'the subcommand with autocomplete') {...
4 Replies
Yeah, but that's for an
InteractionHandler
, right?
Is it possible to use autocompleteRun in a subcommand class without creating a separate InteractionHandler in a different file?Solution
Doesn't matter. You still just do
Ah, ok, that works - thanks