Add allowed_mentions option to Automod alert action
This commit is contained in:
parent
f2cf46e734
commit
eb9cd080fd
1 changed files with 4 additions and 1 deletions
|
@ -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, {
|
||||
|
|
Loading…
Add table
Reference in a new issue