3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-07-11 13:07:20 +00:00

Add postInCaseLog option for mod action Automod actions; allow forcing case log even when log_automatic_actions is disabled

This commit is contained in:
Dragory 2021-04-28 22:39:49 +03:00
parent a65c34dad0
commit 826bcfdd50
7 changed files with 18 additions and 13 deletions

View file

@ -25,6 +25,7 @@ export const MuteAction = automodAction({
notifyChannel: tNullable(t.string),
remove_roles_on_mute: tNullable(t.union([t.boolean, t.array(t.string)])),
restore_roles_on_mute: tNullable(t.union([t.boolean, t.array(t.string)])),
postInCaseLog: tNullable(t.boolean),
}),
defaultConfig: {
@ -42,6 +43,7 @@ export const MuteAction = automodAction({
modId: pluginData.client.user.id,
extraNotes: matchResult.fullSummary ? [matchResult.fullSummary] : [],
automatic: true,
postInCaseLogOverride: actionConfig.postInCaseLog ?? undefined,
};
const userIdsToMute = unique(contexts.map(c => c.user?.id).filter(nonNullish));