feat(voice): support several trigger channels with their own category
A server needs one "create your own room" channel per theme, which a single trigger id could not express. Triggers are now stored as a list, each with its own home category, name template and default limit. Joining a trigger creates the channel at the bottom of that trigger's category, and a member keeps one channel per trigger instead of one room for the whole server. Triggers declared by the single-trigger version and CHANNEL_VOICE_TRIGGER_ID still work as fallbacks, so no server has to be reconfigured.
This commit is contained in:
8 files changed
+787
-112
No files matched your search
@@ -0,0 +1,14 @@
|
||||
-- Several "join to create" triggers per guild, each with its own home category (M14)
|
||||
CREATE TABLE IF NOT EXISTS voice_triggers (
|
||||
trigger_id TEXT PRIMARY KEY,
|
||||
guild_id TEXT NOT NULL,
|
||||
label TEXT,
|
||||
category_id TEXT,
|
||||
template TEXT,
|
||||
user_limit INTEGER NOT NULL DEFAULT 0,
|
||||
enabled INTEGER NOT NULL DEFAULT 1,
|
||||
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
||||
updated_at TEXT
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_voice_triggers_guild ON voice_triggers (guild_id);
|
||||
Reference in new issue
Block a user