Package net.dv8tion.jda.api.interactions
Class AutoCompleteQuery
- java.lang.Object
-
- net.dv8tion.jda.api.interactions.AutoCompleteQuery
-
public class AutoCompleteQuery extends Object
The query input for anauto-complete interaction
.The
value
of such a query may not be a valid instance of the expectedtype
. Discord does not do any validation for auto-complete queries. However, you are required to reply with the correct type.
-
-
Constructor Summary
Constructors Constructor Description AutoCompleteQuery(OptionMapping option)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getName()
The name of the input field, usually an option name inCommandAutoCompleteInteraction
.OptionType
getType()
The expected option type for this query.String
getValue()
The query value that the user is currently typing.int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
AutoCompleteQuery
public AutoCompleteQuery(@Nonnull OptionMapping option)
-
-
Method Detail
-
getName
@Nonnull public String getName()
The name of the input field, usually an option name inCommandAutoCompleteInteraction
.- 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
-
-