Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Unformatted
- API.on(API.CHAT,function(e){/!(countdown|event)/.test(e.message)&&API.sendChat("@"+e.from+" - The event start"+(function(e){if(e<0){return"s in: "+~~(-e/3600000)+":"+("0"+~~(-e/60000)%60).slice(-2)+":"+("0"+~~(-e/1000)%60).slice(-2)}else{return"ed "+(e>3600000?~~(e/3600000)+":":"")+("0"+~~(e/60000)%60).slice(-2)+":"+("0"+~~(e/1000)%60).slice(-2)+" ago"}}(Date.now()-new Date("2014-03-22T19:00:00.000Z"))))})
- // Beautified
- API.on(API.CHAT, function (e) {
- /!(countdown|event)/.test(e.message) && API.sendChat("@" + e.from + " - The event start" +
- (function (e) {
- if (e < 0) {
- return "s in: " + ~~(-e / 3600000) + ":" + ("0" + ~~(-e / 60000) % 60).slice(-2) + ":" + ("0" + ~~(-e / 1000) % 60).slice(-2);
- } else {
- return "ed " + (e > 3600000 ? ~~(e / 3600000) + ":" : "") + ("0" + ~~(e / 60000) % 60).slice(-2) + ":" + ("0" + ~~(e / 1000) % 60).slice(-2) + " ago";
- }
- }(Date.now() - new Date("2014-03-22T19:00:00.000Z"))));
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement