Package me.s3ns3iw00.jcommands.argument
Class AutocompletableInputArgument<I,O>
- java.lang.Object
-
- me.s3ns3iw00.jcommands.argument.Argument<O>
-
- me.s3ns3iw00.jcommands.argument.InputArgument<I,O>
-
- me.s3ns3iw00.jcommands.argument.AutocompletableInputArgument<I,O>
-
- Direct Known Subclasses:
NumberArgument
,StringArgument
public abstract class AutocompletableInputArgument<I,O> extends InputArgument<I,O>
The autocompletable version ofInputArgument
-
-
Constructor Summary
Constructors Constructor Description AutocompletableInputArgument(java.lang.String name, java.lang.String description, org.javacord.api.interaction.SlashCommandOptionType type)
Constructs the argument with the default requirementsAutocompletableInputArgument(java.lang.String name, java.lang.String description, org.javacord.api.interaction.SlashCommandOptionType type, java.lang.Class<O> resultType)
Runs the default constructor and specifies the result type of the value, that the input will be converted to
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAutocomplete(Autocomplete autocomplete)
java.util.List<Autocomplete>
getAutocompletes()
org.javacord.api.interaction.SlashCommandOption
getCommandOption()
-
Methods inherited from class me.s3ns3iw00.jcommands.argument.InputArgument
convertResult, getArgumentValidator, getResultConverter, getResultType, isOptional, setOptional
-
Methods inherited from class me.s3ns3iw00.jcommands.argument.Argument
getDescription, getMismatchListener, getName, getType, setOnMismatch
-
-
-
-
Constructor Detail
-
AutocompletableInputArgument
public AutocompletableInputArgument(java.lang.String name, java.lang.String description, org.javacord.api.interaction.SlashCommandOptionType type)
Constructs the argument with the default requirements- Parameters:
name
- the argument's namedescription
- the argument's descriptiontype
- the type of the input value
-
AutocompletableInputArgument
public AutocompletableInputArgument(java.lang.String name, java.lang.String description, org.javacord.api.interaction.SlashCommandOptionType type, java.lang.Class<O> resultType)
Runs the default constructor and specifies the result type of the value, that the input will be converted to- Parameters:
name
- the argument's namedescription
- the argument's descriptiontype
- the type of the valueresultType
- the type of the converted value
-
-
Method Detail
-
getCommandOption
public org.javacord.api.interaction.SlashCommandOption getCommandOption()
- Overrides:
getCommandOption
in classInputArgument<I,O>
- Returns:
- the command option that need for to register the argument
-
getAutocompletes
public java.util.List<Autocomplete> getAutocompletes()
-
addAutocomplete
public void addAutocomplete(Autocomplete autocomplete)
-
-