feat(gateway): persistent voice auto-reconnect — rejoin same channel after restart/reboot or unexpected drop

This commit is contained in:
asepharyana committed 2026-08-30 14:03:12 +07:00
1 parent 7f45cbff2d
commit 7dfb4035b7
8 files changed
+422 -10

No files matched your search

@@ -0,0 +1,19 @@
-- Voice auto-reconnect: persist desired voice state per guild.
-- The gateway rejoins the same channel after restart/reboot and after an
-- unexpected voice drop (kick / server move / voice server restart).
-- Idempotent: skips if the table already exists.
DO $$
BEGIN
IF NOT EXISTS (
SELECT 1 FROM information_schema.tables
WHERE table_name = 'voice_auto_reconnect'
) THEN
CREATE TABLE "voice_auto_reconnect" (
"guild_id" text PRIMARY KEY NOT NULL,
"channel_id" text NOT NULL,
"channel_name" text,
"connected_at" bigint NOT NULL,
"updated_at" bigint NOT NULL
);
END IF;
END $$;
@@ -141,6 +141,13 @@
"when": 1787830000000,
"tag": "0019_rename_server_name_to_server_nick",
"breakpoints": true
},
{
"idx": 20,
"version": "7",
"when": 1787860000000,
"tag": "0020_add_voice_auto_reconnect",
"breakpoints": true
}
]
}