ICommandDefaultHelpCommandpublic abstract class AbstractHelpCommand extends Object implements ICommand
DefaultHelpCommandDEFAULT_INFO| Constructor | Description |
|---|---|
AbstractHelpCommand() |
| 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 overwrites the method
onCommand from ICommand. |
abstract void |
provideGeneralHelp(CommandEvent event,
String prefix,
Map<String,ICommand> commands) |
This method is called if someone uses this command with no parameters or doesn't give a valid label as an argument.
|
abstract void |
provideSpecificHelp(CommandEvent event,
String prefix,
ICommand command,
Set<String> labels) |
This method is called if someone calls the help command and provides a valid label as the first argument.
|
public final void onCommand(CommandEvent event, net.dv8tion.jda.core.entities.Member member, net.dv8tion.jda.core.entities.TextChannel channel, String[] args)
onCommand from ICommand.
It parses the command and decides whether provideGeneralHelp or provideSpecificHelp will be called.ICommand,
you have to implement this interface on your own.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]...)public abstract void provideGeneralHelp(CommandEvent event, String prefix, Map<String,ICommand> commands)
event - the CommandEvent as for usual commands.prefix - The prefix of the guild this command was called on.commands - an unmodifiable Map that contains all the prefixes with their corresponding commands that are registered for these CommandSettings.public abstract void provideSpecificHelp(CommandEvent event, String prefix, ICommand command, Set<String> labels)
event - the CommandEvent as for usual commands.prefix - The prefix of the guild this command was called on.command - The ICommand that the help was requested for.labels - All the labels that are associated with the ICommand instance.Copyright © 2018. All rights reserved.