3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-27 14:29:29 +01:00

import moment

This commit is contained in:
reality 2015-07-17 23:39:19 +00:00
parent 5084722e0b
commit 7ce6cb5dc2

View File

@ -139,7 +139,7 @@ var users = function(dbot) {
}.bind(this));
}.bind(this);
var checkUserTime = function(user, done) {
if(!_.has(user, 'lastUsed') || (_.has(user, 'lastUsed') && moment(user.lastUsed).diff(moment(user.lastUsed).add(1, day), 'days') > 0)) {
if(!_.has(user, 'lastUsed') || (_.has(user, 'lastUsed') && moment(user.lastUsed).diff(moment(user.lastUsed).add(1, 'day'), 'days') > 0)) {
dbot.api.log.log('tripsit', 'tripbot', '[USERDEBUG] Updating last used date for ' + user.primaryNick);
user.lastUsed = moment().unix();
this.db.save('users', user.id, user, done);