diff --git a/backend/src/plugins/Automod/AutomodPlugin.ts b/backend/src/plugins/Automod/AutomodPlugin.ts index d8c81512..14fc645b 100644 --- a/backend/src/plugins/Automod/AutomodPlugin.ts +++ b/backend/src/plugins/Automod/AutomodPlugin.ts @@ -161,7 +161,7 @@ const configPreprocessor: ConfigPreprocessorFn = options => { if (rule["actions"]["log"] == null) { rule["actions"]["log"] = true; } - if (rule["actions"]["clean"] === true && rule["actions"]["start_thread"]) { + if (rule["actions"]["clean"] && rule["actions"]["start_thread"]) { throw new StrictValidationError([`Cannot have both clean and start_thread at rule '${rule.name}'`]); } } diff --git a/backend/src/plugins/Automod/actions/startThread.ts b/backend/src/plugins/Automod/actions/startThread.ts index 7cc4e8f0..46f7d91e 100644 --- a/backend/src/plugins/Automod/actions/startThread.ts +++ b/backend/src/plugins/Automod/actions/startThread.ts @@ -1,10 +1,10 @@ import { GuildFeature, ThreadAutoArchiveDuration } from "discord-api-types"; import { TextChannel } from "discord.js"; import * as t from "io-ts"; -import { renderTemplate, TemplateSafeValueContainer } from "src/templateFormatter"; +import { renderTemplate, TemplateSafeValueContainer } from "../../../templateFormatter"; import { ChannelTypeStrings } from "src/types"; -import { convertDelayStringToMS, MINUTES, tDelayString, tNullable } from "src/utils"; -import { savedMessageToTemplateSafeSavedMessage, userToTemplateSafeUser } from "src/utils/templateSafeObjects"; +import { convertDelayStringToMS, MINUTES, tDelayString, tNullable } from "../../../utils"; +import { savedMessageToTemplateSafeSavedMessage, userToTemplateSafeUser } from "../../../utils/templateSafeObjects"; import { noop } from "../../../utils"; import { automodAction } from "../helpers";