forked from GitHub/dbot
Fixed run.js
Will now create dbKeys
This commit is contained in:
parent
d0c47d18eb
commit
198fe9992d
2
run.js
2
run.js
@ -211,7 +211,7 @@ DBot.prototype.reloadModules = function() {
|
|||||||
try {
|
try {
|
||||||
var config = JSON.parse(fs.readFileSync(moduleDir + 'config.json', 'utf-8'))
|
var config = JSON.parse(fs.readFileSync(moduleDir + 'config.json', 'utf-8'))
|
||||||
this.config[name] = config;
|
this.config[name] = config;
|
||||||
for(var i=0;i<config.dbKeys;i++) {
|
for(var i=0;i<config.dbKeys.length;i++) {
|
||||||
if(!this.db.hasOwnProperty(config.dbKeys[i])) {
|
if(!this.db.hasOwnProperty(config.dbKeys[i])) {
|
||||||
this.db[config.dbKeys[i]] = {};
|
this.db[config.dbKeys[i]] = {};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user