Package com.reign.kat.lib.command
Class ParentCommand
java.lang.Object
com.reign.kat.lib.command.Command
com.reign.kat.lib.command.ParentCommand
- Direct Known Subclasses:
ConfigParentCommand
@Deprecated
@ReplaceWith("com.reign.kat.lib.command.Command")
public abstract class ParentCommand
extends Command
Deprecated.
ParentCommand
A command which can have multiple subcommands attached to it.
Acts like a regular command, with extra methods for children commands.
Add a new child command with `registerSubcommand(command);`, this can then be called
in Discord with `!command subcommand`.
-
Field Summary
Fields inherited from class com.reign.kat.lib.command.Command
converters, log, name, precommands, requiredDiscordPermission, requiredPermission
-
Constructor Summary
ConstructorsConstructorDescriptionParentCommand
(String[] aliases, String primaryAlias, String description) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionabstract void
execute
(Context ctx, CommandParameters args) Deprecated.void
executeCommands
(Context ctx, List<String> args) Deprecated.Calls the parent command before calling a subcommandDeprecated.Returns the argument signature for the command.getSubcommand
(String alias) Deprecated.void
registerSubcommand
(Command command) Deprecated.Methods inherited from class com.reign.kat.lib.command.Command
addConverter, addPreCommand, getAliases, getDescription, getName, getPrimaryAlias, getRequiredCount, hasChildren, invokeCommand, isPrivileged, isShowTyping, setRequiredDiscordPermission, setRequiredPermissionGroup, setShowTyping, updateSlashData
-
Constructor Details
-
ParentCommand
Deprecated.
-
-
Method Details
-
registerSubcommand
Deprecated.- Overrides:
registerSubcommand
in classCommand
-
getSubcommand
Deprecated.- Overrides:
getSubcommand
in classCommand
-
executeCommands
Deprecated.Calls the parent command before calling a subcommand- Overrides:
executeCommands
in classCommand
- Parameters:
ctx
- Context of the commandargs
- string args to convert into Converters- Throws:
Exception
-
getSignature
Deprecated.Description copied from class:Command
Returns the argument signature for the command.
For example, the command!kick UserID opt:reason
would build a signature string of:-kick <user:User> [reason: String]
- Overrides:
getSignature
in classCommand
- Returns:
- String signature
-
execute
Deprecated.
-