(core): Add app-global setting storage.
New `AppConfig` key-value table for arbitrary app config. New `KeyValueData` setting data mixin. New `AppSettings` settings group. Attached `AppSettings` as `client.settings`. Migrated sponsor settings to `AppSettings`.
This commit is contained in:
@@ -4,6 +4,9 @@ from data import tables
|
||||
|
||||
import core # noqa
|
||||
|
||||
# Note: This MUST be imported after core, due to table definition orders
|
||||
from settings import AppSettings
|
||||
|
||||
import modules # noqa
|
||||
|
||||
# Load and attach app specific data
|
||||
@@ -15,6 +18,8 @@ client.appdata = core.data.meta.fetch_or_create(appname)
|
||||
|
||||
client.data = tables
|
||||
|
||||
client.settings = AppSettings(conf.bot['data_appid'])
|
||||
|
||||
# Initialise all modules
|
||||
client.initialise_modules()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user