mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-14 21:31:50 +00:00
fix: circular dependency in automod types
This commit is contained in:
parent
28692962bc
commit
3db9090705
6 changed files with 10 additions and 9 deletions
|
@ -4,7 +4,7 @@ import { CaseArgs } from "../../Cases/types";
|
|||
import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin";
|
||||
import { resolveActionContactMethods } from "../functions/resolveActionContactMethods";
|
||||
import { automodAction } from "../helpers";
|
||||
import { zNotify } from "../types";
|
||||
import { zNotify } from "../constants";
|
||||
|
||||
const configSchema = z.strictObject({
|
||||
reason: zBoundedCharacters(0, 4000).nullable().default(null),
|
||||
|
|
|
@ -4,7 +4,7 @@ import { CaseArgs } from "../../Cases/types";
|
|||
import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin";
|
||||
import { resolveActionContactMethods } from "../functions/resolveActionContactMethods";
|
||||
import { automodAction } from "../helpers";
|
||||
import { zNotify } from "../types";
|
||||
import { zNotify } from "../constants";
|
||||
|
||||
export const KickAction = automodAction({
|
||||
configSchema: z.strictObject({
|
||||
|
|
|
@ -6,7 +6,7 @@ import { LogsPlugin } from "../../Logs/LogsPlugin";
|
|||
import { MutesPlugin } from "../../Mutes/MutesPlugin";
|
||||
import { resolveActionContactMethods } from "../functions/resolveActionContactMethods";
|
||||
import { automodAction } from "../helpers";
|
||||
import { zNotify } from "../types";
|
||||
import { zNotify } from "../constants";
|
||||
|
||||
export const MuteAction = automodAction({
|
||||
configSchema: z.strictObject({
|
||||
|
|
|
@ -4,7 +4,7 @@ import { CaseArgs } from "../../Cases/types";
|
|||
import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin";
|
||||
import { resolveActionContactMethods } from "../functions/resolveActionContactMethods";
|
||||
import { automodAction } from "../helpers";
|
||||
import { zNotify } from "../types";
|
||||
import { zNotify } from "../constants";
|
||||
|
||||
export const WarnAction = automodAction({
|
||||
configSchema: z.strictObject({
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import z from "zod";
|
||||
import { MINUTES, SECONDS } from "../../utils";
|
||||
|
||||
export const RECENT_SPAM_EXPIRY_TIME = 10 * SECONDS;
|
||||
|
@ -18,3 +19,8 @@ export enum RecentActionType {
|
|||
MemberLeave,
|
||||
ThreadCreate,
|
||||
}
|
||||
|
||||
export const zNotify = z.union([
|
||||
z.literal("dm"),
|
||||
z.literal("channel"),
|
||||
]);
|
||||
|
|
|
@ -65,11 +65,6 @@ const zRule = z.strictObject({
|
|||
});
|
||||
export type TRule = z.infer<typeof zRule>;
|
||||
|
||||
export const zNotify = z.union([
|
||||
z.literal("dm"),
|
||||
z.literal("channel"),
|
||||
]);
|
||||
|
||||
export const zAutomodConfig = z.strictObject({
|
||||
rules: zBoundedRecord(
|
||||
z.record(z.string().max(100), zRule),
|
||||
|
|
Loading…
Add table
Reference in a new issue