var cmds = { stop: $stop, disrupt: _ => { $delay(_ => { disrupt }, 0.5) } } if (cmds[arg[0]]) { log.console(`I am ${arg[0]}`) cmds[arg[0]]() }