LuxGracetail / PS-Roleplaying-Bot

Pokémon Showdown's Roleplaying, AmphyRP and RustyRP Bot
Other
2 stars 6 forks source link

Extracted RP progress time and reused it across .rp (PM, paused and unpaused) and .endrp. #19

Closed limdingwen closed 8 years ago

limdingwen commented 8 years ago

The progressTime(model) function accepts a model, which is the dictionary of the room in this.RP.

Example usage:

console.log(progressTime(this.RP[room])); 1:09:23 console.log(progressTime({setAt: '2016-08-13T08:45:45.327Z', pause: '2016-08-13T08:45:50.327Z'})); 0:00:05 console.log(progressTime(this.RP["roleplaying"])); 1:09:23

LuxGracetail commented 8 years ago

Accepted.