function executeCommand(command) {
  if (commands[command.name]) {
    return commands[command.name](command);
  }
  throw new Error(`'${command.name}' isn't a command.`);
}
Executes a command.
@param command the command to execute