From 94fd3f5e436606a6c5e9a708419b34b39e0d3be2 Mon Sep 17 00:00:00 2001 From: Kodie Date: Sat, 2 Dec 2017 16:19:48 -0800 Subject: [PATCH] Allow plugins to overwrite shared_config --- disco/bot/bot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/disco/bot/bot.py b/disco/bot/bot.py index 0ad87da..f90b882 100644 --- a/disco/bot/bot.py +++ b/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: