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

    • Method Detail

      • 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