From c852a4ada86f208e22609e1b9aa04b490ebde25f Mon Sep 17 00:00:00 2001 From: Psychedelic Squid Date: Sat, 10 Mar 2012 17:35:50 +0000 Subject: [PATCH] Enforce command.js being loaded. Still reloadable, but can't be omitted. --- run.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/run.js b/run.js index 5bcd963..0390b3f 100644 --- a/run.js +++ b/run.js @@ -107,6 +107,11 @@ DBot.prototype.reloadModules = function() { this.timers.clearTimers(); this.save(); + // enforce having command. it can still be reloaded, but dbot _will not_ function without it, so not having it should be impossible + if(!this.moduleNames.include("command")) { + this.moduleNames.push("command"); + } + // Reload Javascript snippets var path = require.resolve('./snippets'); delete require.cache[path];