feature (sponsors): Add sponsor command.

Add new sponsor prompts.
Add new sponsor command.
Add `sponsor_text` table.
Add sponsor global config settings.
Update `Setting.command` to use new `widget`.
Add custom `cmd_str` support to `Message` `SettingType`.
This commit is contained in:
2022-03-12 17:27:25 +02:00
parent 826734e772
commit da9f9b02b1
11 changed files with 170 additions and 10 deletions

View File

@@ -0,0 +1,9 @@
-- Sponsor Data {{{
CREATE TABLE sponsor_text(
ID INTEGER PRIMARY KEY DEFAULT 0,
prompt_text TEXT,
command_response TEXT
);
-- }}}
INSERT INTO VersionHistory (version, author) VALUES (11, 'v10-v11 migration');

View File

@@ -4,7 +4,7 @@ CREATE TABLE VersionHistory(
time TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
author TEXT
);
INSERT INTO VersionHistory (version, author) VALUES (10, 'Initial Creation');
INSERT INTO VersionHistory (version, author) VALUES (11, 'Initial Creation');
CREATE OR REPLACE FUNCTION update_timestamp_column()
@@ -38,6 +38,15 @@ CREATE TABLE global_guild_blacklist(
-- }}}
-- Sponsor Data {{{
CREATE TABLE sponsor_text(
ID INTEGER PRIMARY KEY DEFAULT 0,
prompt_text TEXT,
command_response TEXT
);
-- }}}
-- User configuration data {{{
CREATE TABLE user_config(
userid BIGINT PRIMARY KEY,