Class ConstantArgument
- java.lang.Object
-
- me.s3ns3iw00.jcommands.argument.Argument<R>
-
- me.s3ns3iw00.jcommands.argument.SubArgument<InputArgument,java.lang.String>
-
- me.s3ns3iw00.jcommands.argument.type.ConstantArgument
-
public class ConstantArgument extends SubArgument<InputArgument,java.lang.String>
Only accepts inputs that are exactly the same as its name
-
-
Constructor Summary
Constructors Constructor Description ConstantArgument(java.lang.String name, java.lang.String description)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddArgument(InputArgument argument)Adds an argument to the argumentvoidaddArgument(InputArgument... arguments)Adds arguments to the argumentorg.javacord.api.interaction.SlashCommandOptiongetCommandOption()java.lang.Class<java.lang.String>getResultType()-
Methods inherited from class me.s3ns3iw00.jcommands.argument.SubArgument
getArguments
-
Methods inherited from class me.s3ns3iw00.jcommands.argument.Argument
getDescription, getMismatchListener, getName, getType, setOnMismatch
-
-
-
-
Method Detail
-
getResultType
public java.lang.Class<java.lang.String> getResultType()
- Specified by:
getResultTypein classArgument<java.lang.String>- Returns:
- the class of the result's type
-
getCommandOption
public org.javacord.api.interaction.SlashCommandOption getCommandOption()
- Specified by:
getCommandOptionin classArgument<java.lang.String>- Returns:
- the command option that need for to register the argument
-
addArgument
public void addArgument(InputArgument argument)
Adds an argument to the argument- Specified by:
addArgumentin classSubArgument<InputArgument,java.lang.String>- Parameters:
argument- the argument
-
addArgument
public void addArgument(InputArgument... arguments)
Adds arguments to the argument- Parameters:
arguments- a list of arguments
-
-