diff --git a/modules/admin/admin.js b/modules/admin/admin.js index 74e4af7..6e29fa8 100644 --- a/modules/admin/admin.js +++ b/modules/admin/admin.js @@ -51,6 +51,10 @@ var admin = function(dbot) { fs.writeFileSync('config.json', JSON.stringify(config, null, ' ')); } }; + + this.onLoad = function() { + dbot.api.timers.addTimer(60000, dbot.save); + }; }; exports.fetch = function(dbot) { diff --git a/modules/command/command.js b/modules/command/command.js index adec6e5..459e5a2 100644 --- a/modules/command/command.js +++ b/modules/command/command.js @@ -101,7 +101,6 @@ var command = function(dbot) { } } if(!_.include(['reload', 'load', 'unload', 'setconfig'], commandName)) dbot.api.event.emit('command', [ event ]); - dbot.save(); } else { if(commandName !== this.config.commandPrefix) { if(_.has(dbot.usage, commandName)) {