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.
15 lines
495 B
SQL
15 lines
495 B
SQL
-- 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);
|