| 13997 | } |
| 13998 | static runCommand(instance, command = "", param = undefined) { |
| 13999 | const run = name => { |
| 14000 | console.log(`Running ${name}:`) |
| 14001 | instance[name](param) |
| 14002 | } |
| 14003 | if (instance[command + "Command"]) return run(command + "Command") |
| 14004 | // Get commands from both the child and parent classes |
| 14005 | const classes = [Object.getPrototypeOf(instance), Object.getPrototypeOf(Object.getPrototypeOf(instance))] |