3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Add allowed_mentions option to Automod alert action

This commit is contained in:
Dragory 2021-04-29 00:50:25 +03:00
parent f2cf46e734
commit eb9cd080fd
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -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, {