feat(voice): add temporary voice channel manager
Joining the trigger channel must feel instant and never leave orphan channels behind, so the ownership is stored in SQLite, empty channels are deleted after a short grace period and a startup sweep cleans up whatever a restart left behind.
This commit is contained in:
12 files changed
+1277
-1
No files matched your search
@@ -0,0 +1,14 @@
|
||||
-- Temporary voice channels created by joining the trigger channel (M14)
|
||||
CREATE TABLE IF NOT EXISTS voice_channels (
|
||||
channel_id TEXT PRIMARY KEY,
|
||||
guild_id TEXT NOT NULL,
|
||||
owner_id TEXT NOT NULL,
|
||||
trigger_id TEXT,
|
||||
name TEXT NOT NULL,
|
||||
locked INTEGER NOT NULL DEFAULT 0,
|
||||
user_limit INTEGER NOT NULL DEFAULT 0,
|
||||
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_voice_channels_guild ON voice_channels (guild_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_voice_channels_owner ON voice_channels (guild_id, owner_id);
|
||||
Reference in new issue
Block a user