From eb9cd080fd19f39d1217db413205951f0af972f4 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Thu, 29 Apr 2021 00:50:25 +0300 Subject: [PATCH] Add allowed_mentions option to Automod alert action --- backend/src/plugins/Automod/actions/alert.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/src/plugins/Automod/actions/alert.ts b/backend/src/plugins/Automod/actions/alert.ts index b22f8e3c..2076ae55 100644 --- a/backend/src/plugins/Automod/actions/alert.ts +++ b/backend/src/plugins/Automod/actions/alert.ts @@ -8,6 +8,8 @@ import { messageLink, resolveMember, stripObjectToScalars, + tAllowedMentions, + tNormalizedNullOptional, tNullable, verboseChannelMention, } from "../../../utils"; @@ -21,6 +23,7 @@ export const AlertAction = automodAction({ configType: t.type({ channel: t.string, text: t.string, + allowed_mentions: tNormalizedNullOptional(tAllowedMentions), }), defaultConfig: {}, @@ -70,7 +73,7 @@ export const AlertAction = automodAction({ } try { - await createChunkedMessage(channel, rendered); + await createChunkedMessage(channel, rendered, actionConfig.allowed_mentions); } catch (err) { if (err.code === 50001) { logs.log(LogType.BOT_ALERT, {