ICommandpublic abstract class AbstractCommand extends Object implements ICommand
ICommand| Modifier and Type | Field | Description |
|---|---|---|
protected String |
CHANNEL_MENTION |
A regex to match text channel mentions.
|
protected String |
MEMBER_MENTION |
A regex to match member mentions.
|
protected String |
ROLE_MENTION |
A regex to match role mentions.
|
DEFAULT_INFO| Modifier | Constructor | Description |
|---|---|---|
protected |
AbstractCommand() |
Iterates over the SubCommand-annotated methods and saves them in a cache.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
onCommand(CommandEvent event,
net.dv8tion.jda.core.entities.Member member,
net.dv8tion.jda.core.entities.TextChannel channel,
String[] args) |
This overrides the method declared in
ICommand. |
protected final String MEMBER_MENTION
protected final String ROLE_MENTION
protected final String CHANNEL_MENTION
protected AbstractCommand()
public final void onCommand(CommandEvent event, net.dv8tion.jda.core.entities.Member member, net.dv8tion.jda.core.entities.TextChannel channel, String[] args)
ICommand. It is final, thus it may not be overwritten.
To define own command methods in a sub class of this class, refer to the SubCommand-annotation.onCommand in interface ICommandevent - The CommandEvent instance for this execution.member - The member who called the command.channel - The TextChannel in which the command has been called.args - The command arguments, i.e. everything behind the label ([prefix][label] [arg1] [arg2]...)SubCommandCopyright © 2018. All rights reserved.