mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-17 15:15:02 +00:00
chore: run prettier
This commit is contained in:
parent
77ab2718e7
commit
873bf7eb99
54 changed files with 462 additions and 416 deletions
|
@ -16,7 +16,7 @@ import {
|
|||
zAllowedMentions,
|
||||
zBoundedCharacters,
|
||||
zNullishToUndefined,
|
||||
zSnowflake
|
||||
zSnowflake,
|
||||
} from "../../../utils";
|
||||
import { erisAllowedMentionsToDjsMentionOptions } from "../../../utils/erisAllowedMentionsToDjsMentionOptions";
|
||||
import { messageIsEmpty } from "../../../utils/messageIsEmpty";
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
import z from "zod";
|
||||
import { convertDelayStringToMS, nonNullish, unique, zBoundedCharacters, zDelayString, zSnowflake } from "../../../utils";
|
||||
import {
|
||||
convertDelayStringToMS,
|
||||
nonNullish,
|
||||
unique,
|
||||
zBoundedCharacters,
|
||||
zDelayString,
|
||||
zSnowflake,
|
||||
} from "../../../utils";
|
||||
import { CaseArgs } from "../../Cases/types";
|
||||
import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin";
|
||||
import { zNotify } from "../constants";
|
||||
import { resolveActionContactMethods } from "../functions/resolveActionContactMethods";
|
||||
import { automodAction } from "../helpers";
|
||||
import { zNotify } from "../constants";
|
||||
|
||||
const configSchema = z.strictObject({
|
||||
reason: zBoundedCharacters(0, 4000).nullable().default(null),
|
||||
|
|
|
@ -68,10 +68,7 @@ export const ChangePermsAction = automodAction({
|
|||
configSchema: z.strictObject({
|
||||
target: zBoundedCharacters(1, 2000),
|
||||
channel: zBoundedCharacters(1, 2000).nullable().default(null),
|
||||
perms: z.record(
|
||||
z.enum(allPermissionNames),
|
||||
z.boolean().nullable(),
|
||||
),
|
||||
perms: z.record(z.enum(allPermissionNames), z.boolean().nullable()),
|
||||
}),
|
||||
|
||||
async apply({ pluginData, contexts, actionConfig }) {
|
||||
|
|
|
@ -2,9 +2,9 @@ import z from "zod";
|
|||
import { asyncMap, nonNullish, resolveMember, unique, zBoundedCharacters, zSnowflake } from "../../../utils";
|
||||
import { CaseArgs } from "../../Cases/types";
|
||||
import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin";
|
||||
import { zNotify } from "../constants";
|
||||
import { resolveActionContactMethods } from "../functions/resolveActionContactMethods";
|
||||
import { automodAction } from "../helpers";
|
||||
import { zNotify } from "../constants";
|
||||
|
||||
export const KickAction = automodAction({
|
||||
configSchema: z.strictObject({
|
||||
|
|
|
@ -1,12 +1,19 @@
|
|||
import z from "zod";
|
||||
import { ERRORS, RecoverablePluginError } from "../../../RecoverablePluginError";
|
||||
import { convertDelayStringToMS, nonNullish, unique, zBoundedCharacters, zDelayString, zSnowflake } from "../../../utils";
|
||||
import {
|
||||
convertDelayStringToMS,
|
||||
nonNullish,
|
||||
unique,
|
||||
zBoundedCharacters,
|
||||
zDelayString,
|
||||
zSnowflake,
|
||||
} from "../../../utils";
|
||||
import { CaseArgs } from "../../Cases/types";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { MutesPlugin } from "../../Mutes/MutesPlugin";
|
||||
import { zNotify } from "../constants";
|
||||
import { resolveActionContactMethods } from "../functions/resolveActionContactMethods";
|
||||
import { automodAction } from "../helpers";
|
||||
import { zNotify } from "../constants";
|
||||
|
||||
export const MuteAction = automodAction({
|
||||
configSchema: z.strictObject({
|
||||
|
@ -14,8 +21,14 @@ export const MuteAction = automodAction({
|
|||
duration: zDelayString.nullable().default(null),
|
||||
notify: zNotify.nullable().default(null),
|
||||
notifyChannel: zSnowflake.nullable().default(null),
|
||||
remove_roles_on_mute: z.union([z.boolean(), z.array(zSnowflake)]).nullable().default(null),
|
||||
restore_roles_on_mute: z.union([z.boolean(), z.array(zSnowflake)]).nullable().default(null),
|
||||
remove_roles_on_mute: z
|
||||
.union([z.boolean(), z.array(zSnowflake)])
|
||||
.nullable()
|
||||
.default(null),
|
||||
restore_roles_on_mute: z
|
||||
.union([z.boolean(), z.array(zSnowflake)])
|
||||
.nullable()
|
||||
.default(null),
|
||||
postInCaseLog: z.boolean().nullable().default(null),
|
||||
hide_case: z.boolean().nullable().default(false),
|
||||
}),
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
verboseChannelMention,
|
||||
zBoundedCharacters,
|
||||
zDelayString,
|
||||
zMessageContent
|
||||
zMessageContent,
|
||||
} from "../../../utils";
|
||||
import { hasDiscordPermissions } from "../../../utils/hasDiscordPermissions";
|
||||
import { messageIsEmpty } from "../../../utils/messageIsEmpty";
|
||||
|
|
|
@ -2,9 +2,9 @@ import z from "zod";
|
|||
import { asyncMap, nonNullish, resolveMember, unique, zBoundedCharacters, zSnowflake } from "../../../utils";
|
||||
import { CaseArgs } from "../../Cases/types";
|
||||
import { ModActionsPlugin } from "../../ModActions/ModActionsPlugin";
|
||||
import { zNotify } from "../constants";
|
||||
import { resolveActionContactMethods } from "../functions/resolveActionContactMethods";
|
||||
import { automodAction } from "../helpers";
|
||||
import { zNotify } from "../constants";
|
||||
|
||||
export const WarnAction = automodAction({
|
||||
configSchema: z.strictObject({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue