mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-14 13:55:03 +00:00
refactor: replace io-ts with zod
This commit is contained in:
parent
fafaefa1fb
commit
28692962bc
161 changed files with 1450 additions and 2105 deletions
|
@ -2,7 +2,6 @@ import { GuildChannel, GuildMember, User } from "discord.js";
|
|||
import { guildPluginMessageCommand, parseSignature } from "knub";
|
||||
import { TSignature } from "knub-command-manager";
|
||||
import { commandTypes } from "../../commandTypes";
|
||||
import { makeIoTsConfigParser } from "../../pluginUtils";
|
||||
import { TemplateSafeValueContainer, createTypedTemplateSafeValueContainer } from "../../templateFormatter";
|
||||
import { UnknownUser } from "../../utils";
|
||||
import { isScalar } from "../../utils/isScalar";
|
||||
|
@ -14,7 +13,7 @@ import {
|
|||
} from "../../utils/templateSafeObjects";
|
||||
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
|
||||
import { runEvent } from "./functions/runEvent";
|
||||
import { ConfigSchema, CustomEventsPluginType } from "./types";
|
||||
import { CustomEventsPluginType, zCustomEventsConfig } from "./types";
|
||||
|
||||
const defaultOptions = {
|
||||
config: {
|
||||
|
@ -26,7 +25,7 @@ export const CustomEventsPlugin = zeppelinGuildPlugin<CustomEventsPluginType>()(
|
|||
name: "custom_events",
|
||||
showInDocs: false,
|
||||
|
||||
configParser: makeIoTsConfigParser(ConfigSchema),
|
||||
configParser: (input) => zCustomEventsConfig.parse(input),
|
||||
defaultOptions,
|
||||
|
||||
afterLoad(pluginData) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue