From 106b8480dfd8e81f53151ce538ad8d4d3f7f9064 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 25 Sep 2025 18:25:31 -0700 Subject: fix(gateway:aiModeration): Add user message deletion notification --- packages/gateway/src/listeners/aiModeration.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/packages/gateway/src/listeners/aiModeration.ts b/packages/gateway/src/listeners/aiModeration.ts index e699bee..af84745 100644 --- a/packages/gateway/src/listeners/aiModeration.ts +++ b/packages/gateway/src/listeners/aiModeration.ts @@ -308,6 +308,21 @@ export const handleAIModeration = (client: Client) => { try { await message.delete(); console.log(`AI Moderation: Auto-deleted high severity violation`); + + try { + const notificationText = `${message.author}, your message was deleted: **${analysis.brief}**. This notification will be deleted in 10 seconds.`; + const notificationMessage = await message.channel.send(notificationText); + + setTimeout(async () => { + try { + await notificationMessage.delete(); + } catch (error) { + console.error("Failed to delete notification message:", error); + } + }, 10000); + } catch (error) { + console.error("Failed to send notification message:", error); + } } catch (error) { console.error("Failed to delete message:", error); } -- cgit v1.2.3