mirror of
https://github.com/reality/dbot.git
synced 2024-11-27 22:39:26 +01:00
Merge pull request #24 from psquid/master
Enforce command.js being loaded.
This commit is contained in:
commit
b1a2f6edf6
5
run.js
5
run.js
@ -107,6 +107,11 @@ DBot.prototype.reloadModules = function() {
|
|||||||
this.timers.clearTimers();
|
this.timers.clearTimers();
|
||||||
this.save();
|
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
|
// Reload Javascript snippets
|
||||||
var path = require.resolve('./snippets');
|
var path = require.resolve('./snippets');
|
||||||
delete require.cache[path];
|
delete require.cache[path];
|
||||||
|
Loading…
Reference in New Issue
Block a user