3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-23 01:25:02 +00:00

Merge branch 'automod-start-thread-action' of https://github.com/metal0/ZeppelinBot into pr/metal0/274

This commit is contained in:
metal 2021-09-06 12:58:03 +00:00 committed by GitHub
commit 39fc748982
2 changed files with 4 additions and 4 deletions

View file

@ -161,7 +161,7 @@ const configPreprocessor: ConfigPreprocessorFn<AutomodPluginType> = 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}'`]);
}
}

View file

@ -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";