From a23fec06bc6167ba6f07c7f840514a3f58aa1dfb Mon Sep 17 00:00:00 2001 From: Kodie Date: Sat, 2 Dec 2017 16:17:14 -0800 Subject: [PATCH] Add shared_config to BotConfig --- disco/bot/bot.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/disco/bot/bot.py b/disco/bot/bot.py index 5419c4d..0ad87da 100644 --- a/disco/bot/bot.py +++ b/disco/bot/bot.py @@ -76,6 +76,7 @@ class BotConfig(Config): levels = {} plugins = [] plugin_config = {} + shared_config = {} commands_enabled = True commands_require_mention = True @@ -511,6 +512,9 @@ 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: