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_GROUPtype that only can containConstantArgumentThis is for groupingSlashCommandOptionType.SUB_COMMANDoptions becauseSlashCommandOptionType.SUB_COMMANDcannot 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 voidaddArgument(ConstantArgument argument)Adds aConstantArgumentto the argumentvoidaddArgument(ConstantArgument... arguments)Adds a list ofConstantArgumentto 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(ConstantArgument argument)
Adds aConstantArgumentto the argument- Specified by:
addArgumentin classSubArgument<ConstantArgument,java.lang.String>- Parameters:
argument- the argument
-
addArgument
public void addArgument(ConstantArgument... arguments)
Adds a list ofConstantArgumentto the argument- Parameters:
arguments- the arguments
-
-