(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:
2022-03-19 15:54:34 +02:00
parent bccbf38310
commit ace84c9388
9 changed files with 120 additions and 48 deletions

View File

@@ -1,8 +1,22 @@
-- App Config Data {{{
CREATE TABLE AppConfig(
appid TEXT,
key TEXT,
value TEXT,
PRIMARY KEY(appid, key)
);
-- }}}
-- Sponsor Data {{{
CREATE TABLE sponsor_text(
ID INTEGER PRIMARY KEY DEFAULT 0,
prompt_text TEXT,
command_response TEXT
CREATE TABLE sponsor_guild_whitelist(
guildid INTEGER PRIMARY KEY
);
-- }}}
-- Topgg Data {{{
CREATE TABLE topgg_guild_whitelist(
guildid INTEGER PRIMARY KEY
);
-- }}}