@Documented @Target(METHOD) @Retention(RUNTIME) public @interface SubCommand
void (com.github.johnnyjayjay.commandapi.CommandEvent, net.dv8tion.jda.core.entities.Member, net.dv8tion.jda.core.entities.TextChannel, java.lang.String[])
in order to be registered (you will get a warning if a signature violates that).AbstractCommand| Modifier and Type | Optional Element | Description |
|---|---|---|
String[] |
args |
An array of Strings, specifying a regex for each needed command argument.
|
net.dv8tion.jda.core.Permission[] |
botPerms |
An array of
Permission that specifies which Permissions the self member has to have in the event channel in order to trigger this method. |
boolean |
isDefault |
Setting this to true marks a SubCommand as the default SubCommand.
|
boolean |
moreArgs |
A boolean that indicates that there must be more arguments than specified in args in order to be triggered.
|
boolean isDefault
String[] args
{"get", "<@!?\\d+>"}, the
method will only be triggered if the command matches: [prefix][label] get [member mention]. Of course, you don't have to use regex.
You may also use just normal words and then make your checks inside of the method.
Values specified in isDefault-SubCommands are ignored.boolean moreArgs
Copyright © 2018. All rights reserved.