refactor: replace io-ts with zod

This commit is contained in:
Dragory 2024-01-14 14:25:42 +00:00
parent fafaefa1fb
commit 28692962bc
No known key found for this signature in database
161 changed files with 1450 additions and 2105 deletions

View file

@ -1,11 +1,10 @@
import { CooldownManager } from "knub";
import { GuildLogs } from "../../data/GuildLogs";
import { makeIoTsConfigParser } from "../../pluginUtils";
import { trimPluginDescription } from "../../utils";
import { LogsPlugin } from "../Logs/LogsPlugin";
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
import { VoiceStateUpdateEvt } from "./events/VoiceStateUpdateEvt";
import { CompanionChannelsPluginType, ConfigSchema } from "./types";
import { CompanionChannelsPluginType, zCompanionChannelsConfig } from "./types";
const defaultOptions = {
config: {
@ -23,11 +22,11 @@ export const CompanionChannelsPlugin = zeppelinGuildPlugin<CompanionChannelsPlug
Once set up, any time a user joins one of the specified voice channels,
they'll get channel permissions applied to them for the text channels.
`),
configSchema: ConfigSchema,
configSchema: zCompanionChannelsConfig,
},
dependencies: () => [LogsPlugin],
configParser: makeIoTsConfigParser(ConfigSchema),
configParser: (input) => zCompanionChannelsConfig.parse(input),
defaultOptions,
events: [VoiceStateUpdateEvt],