forked from GitHub/dbot
pushconfig operational [#489]
This commit is contained in:
parent
815d7a39cd
commit
7592a6caa4
@ -208,17 +208,12 @@ var commands = function(dbot) {
|
||||
if(_.isArray(config)) {
|
||||
event.reply(configPath + ": " + config + " << " + newOption);
|
||||
config.push(newOption);
|
||||
this.db.save('config', configPath, {
|
||||
'key': configPath,
|
||||
'value': config
|
||||
}, function(err) {
|
||||
dbot.reloadModules();
|
||||
});
|
||||
this.internalAPI.setConfig(configPath, config, function(err) {});
|
||||
} else {
|
||||
event.reply(dbot.t("config_array", { "alternate": "setconfig" }));
|
||||
}
|
||||
} else {
|
||||
event.reply(dbot.t("no_config_key"));
|
||||
event.reply(dbot.t("no_config_key", { 'path': configPath }));
|
||||
}
|
||||
}.bind(this));
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user