Browse Source

Allow plugins to overwrite shared_config

pull/67/head
Kodie 8 years ago
parent
commit
94fd3f5e43
  1. 6
      disco/bot/bot.py

6
disco/bot/bot.py

@ -505,6 +505,9 @@ class Bot(LoggingClass):
self.config.plugin_config_dir, name) + '.' + self.config.plugin_config_format
data = {}
if self.config.shared_config:
data.update(self.config.shared)
if name in self.config.plugin_config:
data.update(self.config.plugin_config[name])
@ -512,9 +515,6 @@ class Bot(LoggingClass):
with open(path, 'r') as f:
data.update(Serializer.loads(self.config.plugin_config_format, f.read()))
if self.config.shared_config:
data.update(self.config.shared)
if hasattr(cls, 'config_cls'):
inst = cls.config_cls()
if data:

Loading…
Cancel
Save