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:
BlackAngelTV committed 2026-09-15 14:51:17 +02:00
1 parent ef1bedbc65
commit 5191942d5a
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);