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

@ -2,10 +2,9 @@ import { PluginOptions } from "knub";
import { Queue } from "../../Queue";
import { GuildNicknameHistory } from "../../data/GuildNicknameHistory";
import { UsernameHistory } from "../../data/UsernameHistory";
import { makeIoTsConfigParser } from "../../pluginUtils";
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
import { NamesCmd } from "./commands/NamesCmd";
import { ConfigSchema, NameHistoryPluginType } from "./types";
import { NameHistoryPluginType, zNameHistoryConfig } from "./types";
const defaultOptions: PluginOptions<NameHistoryPluginType> = {
config: {
@ -25,7 +24,7 @@ export const NameHistoryPlugin = zeppelinGuildPlugin<NameHistoryPluginType>()({
name: "name_history",
showInDocs: false,
configParser: makeIoTsConfigParser(ConfigSchema),
configParser: (input) => zNameHistoryConfig.parse(input),
defaultOptions,
// prettier-ignore