3
0
mirror of https://github.com/reality/dbot.git synced 2025-01-24 11:04:13 +01:00

order by int not string

This commit is contained in:
reality 2015-01-19 22:25:03 +00:00
parent 3f6153a7cf
commit e5b8034e0f

View File

@ -114,7 +114,7 @@ var commands = function(dbot) {
event.reply(user.primaryNick + ' has been warned ' + warn + ' times, quieted ' + quiet + ' times, and reported ' + report + ' times.'); event.reply(user.primaryNick + ' has been warned ' + warn + ' times, quieted ' + quiet + ' times, and reported ' + report + ' times.');
_.each(_.keys(items).sort(function(a, b) { _.each(_.keys(items).sort(function(a, b) {
return parseInt(a) - parseInt(b); return parseInt(new Date(a).getTime()) - parseInt(new Date(b).getTime());
}), function(time) { }), function(time) {
event.reply('[' + moment(parseInt(time)).format('DD/MM/YYYY') + '] ' + items[time]); event.reply('[' + moment(parseInt(time)).format('DD/MM/YYYY') + '] ' + items[time]);
}); });