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,12 @@
import { PluginOptions } from "knub";
import z from "zod";
import { Queue } from "../../Queue";
import { Webhooks } from "../../data/Webhooks";
import { makeIoTsConfigParser, mapToPublicFn } from "../../pluginUtils";
import { mapToPublicFn } from "../../pluginUtils";
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
import { editMessage } from "./functions/editMessage";
import { sendMessage } from "./functions/sendMessage";
import { ConfigSchema, InternalPosterPluginType } from "./types";
import { InternalPosterPluginType } from "./types";
const defaultOptions: PluginOptions<InternalPosterPluginType> = {
config: {},
@ -16,7 +17,7 @@ export const InternalPosterPlugin = zeppelinGuildPlugin<InternalPosterPluginType
name: "internal_poster",
showInDocs: false,
configParser: makeIoTsConfigParser(ConfigSchema),
configParser: (input) => z.strictObject({}).parse(input),
defaultOptions,
// prettier-ignore