Class GroupArgument
- java.lang.Object
-
- me.s3ns3iw00.jcommands.argument.Argument<R>
-
- me.s3ns3iw00.jcommands.argument.SubArgument<ConstantArgument,java.lang.String>
-
- me.s3ns3iw00.jcommands.argument.type.GroupArgument
-
public class GroupArgument extends SubArgument<ConstantArgument,java.lang.String>
Represents an argument withSlashCommandOptionType.SUB_COMMAND_GROUP
type that only can containConstantArgument
This is for groupingSlashCommandOptionType.SUB_COMMAND
options becauseSlashCommandOptionType.SUB_COMMAND
cannot be nested
-
-
Constructor Summary
Constructors Constructor Description GroupArgument(java.lang.String name, java.lang.String description)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addArgument(ConstantArgument argument)
Adds aConstantArgument
to the argumentvoid
addArgument(ConstantArgument... arguments)
Adds a list ofConstantArgument
to the argumentorg.javacord.api.interaction.SlashCommandOption
getCommandOption()
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:
getResultType
in classArgument<java.lang.String>
- Returns:
- the class of the result's type
-
getCommandOption
public org.javacord.api.interaction.SlashCommandOption getCommandOption()
- Specified by:
getCommandOption
in classArgument<java.lang.String>
- Returns:
- the command option that need for to register the argument
-
addArgument
public void addArgument(ConstantArgument argument)
Adds aConstantArgument
to the argument- Specified by:
addArgument
in classSubArgument<ConstantArgument,java.lang.String>
- Parameters:
argument
- the argument
-
addArgument
public void addArgument(ConstantArgument... arguments)
Adds a list ofConstantArgument
to the argument- Parameters:
arguments
- the arguments
-
-