Class AutoCompleteQuery

java.lang.Object
net.dv8tion.jda.api.interactions.AutoCompleteQuery

public class AutoCompleteQuery extends Object
The query input for an auto-complete interaction.

The value of such a query may not be a valid instance of the expected type. Discord does not do any validation for auto-complete queries. However, you are required to reply with the correct type.

  • Constructor Details

  • Method Details

    • getName

      @Nonnull public String getName()
      The name of the input field, usually an option name in CommandAutoCompleteInteraction.
      Returns:
      The option name
    • getValue

      @Nonnull public String getValue()
      The query value that the user is currently typing.

      This is not validated and may not be a valid value for an actual command. For instance, a user may input invalid numbers for OptionType.NUMBER.

      Returns:
      The current auto-completable query value
    • getType

      @Nonnull public OptionType getType()
      The expected option type for this query.
      Returns:
      The option type expected from this auto-complete response
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object