Fix log_automatic_actions option not working for automod actions
This commit is contained in:
parent
53b64682ee
commit
cc795c9742
4 changed files with 12 additions and 4 deletions
|
@ -4,6 +4,7 @@ import { LogType } from "../../../data/LogType";
|
|||
import { asyncMap, nonNullish, resolveMember, tNullable, unique } from "../../../utils";
|
||||
import { resolveActionContactMethods } from "../functions/resolveActionContactMethods";
|
||||
import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin";
|
||||
import { CaseArgs } from "../../Cases/types";
|
||||
|
||||
export const BanAction = automodAction({
|
||||
configType: t.type({
|
||||
|
@ -22,9 +23,10 @@ export const BanAction = automodAction({
|
|||
const contactMethods = actionConfig.notify ? resolveActionContactMethods(pluginData, actionConfig) : undefined;
|
||||
const deleteMessageDays = actionConfig.deleteMessageDays || undefined;
|
||||
|
||||
const caseArgs = {
|
||||
const caseArgs: Partial<CaseArgs> = {
|
||||
modId: pluginData.client.user.id,
|
||||
extraNotes: matchResult.fullSummary ? [matchResult.fullSummary] : [],
|
||||
automatic: true,
|
||||
};
|
||||
|
||||
const userIdsToBan = unique(contexts.map(c => c.user?.id).filter(nonNullish));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue