AbstractCommand, AbstractHelpCommand, DefaultHelpCommand@FunctionalInterface public interface ICommand
AbstractCommand,
AbstractHelpCommand| Modifier and Type | Field | Description |
|---|---|---|
static net.dv8tion.jda.core.entities.Message |
DEFAULT_INFO |
The default info message, which is simply "No info, description or help set for this command".
|
| Modifier and Type | Method | Description |
|---|---|---|
default String |
info(net.dv8tion.jda.core.entities.Member member) |
Deprecated.
This method is deprecated.
|
default net.dv8tion.jda.core.entities.Message |
info(net.dv8tion.jda.core.entities.Member member,
String prefix,
Set<String> labels) |
In case you are using DefaultHelpCommand of this framework, your command classes should override this method.
|
void |
onCommand(CommandEvent event,
net.dv8tion.jda.core.entities.Member member,
net.dv8tion.jda.core.entities.TextChannel channel,
String[] args) |
This method is called if someone calls a corresponding command label to this instance, so it works similar to an event method.
|
static final net.dv8tion.jda.core.entities.Message DEFAULT_INFO
Message info(Member, String, Set<String>) if not overwritten.void onCommand(CommandEvent event, net.dv8tion.jda.core.entities.Member member, net.dv8tion.jda.core.entities.TextChannel channel, String[] args)
event - 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]...)@Deprecated default String info(net.dv8tion.jda.core.entities.Member member)
member - The member who requested help.default net.dv8tion.jda.core.entities.Message info(net.dv8tion.jda.core.entities.Member member,
String prefix,
Set<String> labels)
member - The Member that called the command. Might be helpful to check for permissions or make mentions possible.prefix - The prefix of the guild the help command was called on.labels - The registered labels of this ICommand instance. Useful to display aliases.DefaultHelpCommand,
AbstractHelpCommand,
MessageBuilderCopyright © 2018. All rights reserved.