Do not load settings which are not active (module not loaded)
Restart the bot, on heavy DB errors, with an 30 seconds delay (like: all connections terminated by DB, table_definition_cache exhausted) Fix for channel prefixing (org <-> priv)
This commit is contained in:
@@ -24,6 +24,10 @@ class SettingService:
|
||||
for _, inst in Registry.get_all_instances().items():
|
||||
for name, method in get_attrs(inst).items():
|
||||
if hasattr(method, "setting"):
|
||||
key = Registry.get_module_name(inst).split(".")
|
||||
# We dont want to load settings, if their modules not enabled in our config...
|
||||
if key[0] not in self.bot.modules:
|
||||
continue
|
||||
setting_name, value, description, extended_description, obj = getattr(method, "setting")
|
||||
self.register(inst.module_name, setting_name, value, obj, description, extended_description)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user