Advertisement
Guest User

Untitled

a guest
Sep 13th, 2015
131
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if(race.players.every(isDone)) {
  2. race.inProgress = false;
  3. race.players = sortByKey(race.players, 'time');
  4. client.say(to, 'The race is now complete! The winner is ' + race.players[0].player + ' with a time of ' + msToTime(race.players[0].time).toString());
  5. client.say(config.mainChannel, c.green('The race ' + race.raceGame + ' in channel ' + to + ' has finished!'));
  6. client.say(config.mainChannel, 'The winner was ' + race.players[0].player + ' with a time of ' + msToTime(race.players[0].time).toString());
  7. }
  8.  
  9. function isDone(element, index, array) {
  10. return element.done;
  11. }
Advertisement
RAW Paste Data Copied
Advertisement