@FunctionalInterface
public interface CommandHandler
| Modifier and Type | Method and Description |
|---|---|
void |
onCommand(Command command,
TextMessage message)
Handles a command.
|
default CommandHandler |
withName(java.lang.String name,
java.lang.String... aliases)
Returns a new CommandHandler that filters command with the specified
name or aliases.
|
void onCommand(Command command, TextMessage message) throws java.lang.Throwable
command - the commandmessage - the command messagejava.lang.Throwable - if a throwable is throwndefault CommandHandler withName(java.lang.String name, java.lang.String... aliases)
name - the name of the commands to handlealiases - the aliases of the command to handle