mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +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:
parent
aa43f05173
commit
45e81848a7
7 changed files with 18 additions and 13 deletions
|
@ -12,6 +12,7 @@ export const BanAction = automodAction({
|
|||
notify: tNullable(t.string),
|
||||
notifyChannel: tNullable(t.string),
|
||||
deleteMessageDays: tNullable(t.number),
|
||||
postInCaseLog: tNullable(t.boolean),
|
||||
}),
|
||||
|
||||
defaultConfig: {
|
||||
|
@ -27,6 +28,7 @@ export const BanAction = automodAction({
|
|||
modId: pluginData.client.user.id,
|
||||
extraNotes: matchResult.fullSummary ? [matchResult.fullSummary] : [],
|
||||
automatic: true,
|
||||
postInCaseLogOverride: actionConfig.postInCaseLog ?? undefined,
|
||||
};
|
||||
|
||||
const userIdsToBan = unique(contexts.map(c => c.user?.id).filter(nonNullish));
|
||||
|
|
|
@ -11,6 +11,7 @@ export const KickAction = automodAction({
|
|||
reason: tNullable(t.string),
|
||||
notify: tNullable(t.string),
|
||||
notifyChannel: tNullable(t.string),
|
||||
postInCaseLog: tNullable(t.boolean),
|
||||
}),
|
||||
|
||||
defaultConfig: {
|
||||
|
@ -25,6 +26,7 @@ export const KickAction = automodAction({
|
|||
modId: pluginData.client.user.id,
|
||||
extraNotes: matchResult.fullSummary ? [matchResult.fullSummary] : [],
|
||||
automatic: true,
|
||||
postInCaseLogOverride: actionConfig.postInCaseLog ?? undefined,
|
||||
};
|
||||
|
||||
const userIdsToKick = unique(contexts.map(c => c.user?.id).filter(nonNullish));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -11,6 +11,7 @@ export const WarnAction = automodAction({
|
|||
reason: tNullable(t.string),
|
||||
notify: tNullable(t.string),
|
||||
notifyChannel: tNullable(t.string),
|
||||
postInCaseLog: tNullable(t.boolean),
|
||||
}),
|
||||
|
||||
defaultConfig: {
|
||||
|
@ -25,6 +26,7 @@ export const WarnAction = automodAction({
|
|||
modId: pluginData.client.user.id,
|
||||
extraNotes: matchResult.fullSummary ? [matchResult.fullSummary] : [],
|
||||
automatic: true,
|
||||
postInCaseLogOverride: actionConfig.postInCaseLog ?? undefined,
|
||||
};
|
||||
|
||||
const userIdsToWarn = unique(contexts.map(c => c.user?.id).filter(nonNullish));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue