addCommand method

void addCommand(
  1. String command,
  2. CommandExecutionCallback callback
)

Add a command to the command handler. command is its name, and callback is the callback to invoke

Implementation

void addCommand(String command, CommandExecutionCallback callback) {
  commands[command.toLowerCase()] = callback;
}