From ed438e6fc0e00b9d34d7674452becc1df4c006e6 Mon Sep 17 00:00:00 2001 From: MythEclipse Date: Fri, 15 May 2026 15:58:38 +0700 Subject: [PATCH] feat: split text and voice channel selection Separate text moderation and voice recording guild/channel state so each workflow can persist and operate independently. Co-Authored-By: Claude Opus 4.7 --- .env.example | 11 ++++- public/index.html | 41 +++++++++------- src/config.ts | 15 +++++- src/moderation/backlogSync.ts | 16 +++++-- src/moderation/messageCapture.ts | 32 +++++++++++-- src/routes/uiStateRoutes.ts | 11 +++-- src/routes/voiceRoutes.ts | 4 +- src/webserver.ts | 40 ++++++++++++++-- tests/config.test.ts | 40 ++++++++++++++++ tests/moderation/messageCaptureFilter.test.ts | 27 +++++++++++ tests/routes/syncRoutes.test.ts | 47 +++++++++++++++++++ .../videoStreamWorkspaceDependency.test.ts | 6 +-- 12 files changed, 250 insertions(+), 40 deletions(-) create mode 100644 tests/moderation/messageCaptureFilter.test.ts create mode 100644 tests/routes/syncRoutes.test.ts diff --git a/.env.example b/.env.example index c217f40..f481229 100644 --- a/.env.example +++ b/.env.example @@ -25,12 +25,21 @@ WEBSERVER_PORT=3000 VOICE_CONNECTION_TIMEOUT_MS=15000 RECONNECT_TIMEOUT_MS=5000 +# Voice Recording Selection +# VOICE_GUILD_ID falls back to legacy GUILD_ID when omitted. +GUILD_ID=legacy_voice_guild_id +VOICE_GUILD_ID=voice_guild_id +VOICE_CHANNEL_ID=voice_channel_id + # Logging Configuration LOG_LEVEL=info NODE_ENV=development # Moderation Configuration -MONITOR_GUILD_ID=your_guild_id_here +# TEXT_GUILD_ID falls back to legacy MONITOR_GUILD_ID when omitted. +MONITOR_GUILD_ID=legacy_text_guild_id +TEXT_GUILD_ID=text_guild_id +TEXT_CHANNEL_ID=text_channel_id PICSER_UPLOAD_URL=https://picser.asepharyana.tech/api/upload ATTACHMENT_UPLOAD_TIMEOUT_MS=30000 ATTACHMENT_MAX_SIZE_MB=100 diff --git a/public/index.html b/public/index.html index bad4490..4bc29a8 100644 --- a/public/index.html +++ b/public/index.html @@ -24,7 +24,7 @@
@@ -33,7 +33,7 @@

Voice Control

bridge
-
+
Idle
@@ -53,8 +53,9 @@