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

fix: automod types

This commit is contained in:
Dragory 2024-01-15 22:39:27 +00:00
parent 5a5be89573
commit e4b098b563
No known key found for this signature in database
3 changed files with 9 additions and 9 deletions

View file

@ -2,7 +2,7 @@ import { PermissionsBitField, PermissionsString } from "discord.js";
import { U } from "ts-toolbelt";
import z from "zod";
import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFormatter";
import { isValidSnowflake, keys, noop, zSnowflake } from "../../../utils";
import { isValidSnowflake, keys, noop, zBoundedCharacters, zSnowflake } from "../../../utils";
import {
guildToTemplateSafeGuild,
savedMessageToTemplateSafeSavedMessage,
@ -66,8 +66,8 @@ const allPermissionNames = [...permissionNames, ...legacyPermissionNames] as con
export const ChangePermsAction = automodAction({
configSchema: z.strictObject({
target: zSnowflake,
channel: zSnowflake.nullable().default(null),
target: zBoundedCharacters(1, 255),
channel: zBoundedCharacters(1, 255).nullable().default(null),
perms: z.record(
z.enum(allPermissionNames),
z.boolean().nullable(),