Class GroupArgument


  • public class GroupArgument
    extends SubArgument<ConstantArgument,​java.lang.String>
    Represents an argument with SlashCommandOptionType.SUB_COMMAND_GROUP type that only can contain ConstantArgument This is for grouping SlashCommandOptionType.SUB_COMMAND options because SlashCommandOptionType.SUB_COMMAND cannot be nested
    • Constructor Detail

      • GroupArgument

        public GroupArgument​(java.lang.String name,
                             java.lang.String description)
    • Method Detail

      • getResultType

        public java.lang.Class<java.lang.String> getResultType()
        Specified by:
        getResultType in class Argument<java.lang.String>
        Returns:
        the class of the result's type
      • getCommandOption

        public org.javacord.api.interaction.SlashCommandOption getCommandOption()
        Specified by:
        getCommandOption in class Argument<java.lang.String>
        Returns:
        the command option that need for to register the argument
      • addArgument

        public void addArgument​(ConstantArgument... arguments)
        Adds a list of ConstantArgument to the argument
        Parameters:
        arguments - the arguments