Browse Source

Add shared_config to BotConfig

pull/67/head
Kodie 8 years ago
parent
commit
a23fec06bc
  1. 4
      disco/bot/bot.py

4
disco/bot/bot.py

@ -76,6 +76,7 @@ class BotConfig(Config):
levels = {} levels = {}
plugins = [] plugins = []
plugin_config = {} plugin_config = {}
shared_config = {}
commands_enabled = True commands_enabled = True
commands_require_mention = True commands_require_mention = True
@ -511,6 +512,9 @@ class Bot(LoggingClass):
with open(path, 'r') as f: with open(path, 'r') as f:
data.update(Serializer.loads(self.config.plugin_config_format, f.read())) 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'): if hasattr(cls, 'config_cls'):
inst = cls.config_cls() inst = cls.config_cls()
if data: if data:

Loading…
Cancel
Save