mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 14:11:50 +00:00
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,
|
messageLink,
|
||||||
resolveMember,
|
resolveMember,
|
||||||
stripObjectToScalars,
|
stripObjectToScalars,
|
||||||
|
tAllowedMentions,
|
||||||
|
tNormalizedNullOptional,
|
||||||
tNullable,
|
tNullable,
|
||||||
verboseChannelMention,
|
verboseChannelMention,
|
||||||
} from "../../../utils";
|
} from "../../../utils";
|
||||||
|
@ -21,6 +23,7 @@ export const AlertAction = automodAction({
|
||||||
configType: t.type({
|
configType: t.type({
|
||||||
channel: t.string,
|
channel: t.string,
|
||||||
text: t.string,
|
text: t.string,
|
||||||
|
allowed_mentions: tNormalizedNullOptional(tAllowedMentions),
|
||||||
}),
|
}),
|
||||||
|
|
||||||
defaultConfig: {},
|
defaultConfig: {},
|
||||||
|
@ -70,7 +73,7 @@ export const AlertAction = automodAction({
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await createChunkedMessage(channel, rendered);
|
await createChunkedMessage(channel, rendered, actionConfig.allowed_mentions);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err.code === 50001) {
|
if (err.code === 50001) {
|
||||||
logs.log(LogType.BOT_ALERT, {
|
logs.log(LogType.BOT_ALERT, {
|
||||||
|
|
Loading…
Add table
Reference in a new issue