mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-11 20:55:01 +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
|
@ -5,7 +5,7 @@ import { GuildCases } from "../../data/GuildCases";
|
|||
import { onGuildEvent } from "../../data/GuildEvents";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildMutes } from "../../data/GuildMutes";
|
||||
import { makeIoTsConfigParser, mapToPublicFn } from "../../pluginUtils";
|
||||
import { mapToPublicFn } from "../../pluginUtils";
|
||||
import { CasesPlugin } from "../Cases/CasesPlugin";
|
||||
import { LogsPlugin } from "../Logs/LogsPlugin";
|
||||
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
|
||||
|
@ -22,7 +22,7 @@ import { offMutesEvent } from "./functions/offMutesEvent";
|
|||
import { onMutesEvent } from "./functions/onMutesEvent";
|
||||
import { renewTimeoutMute } from "./functions/renewTimeoutMute";
|
||||
import { unmuteUser } from "./functions/unmuteUser";
|
||||
import { ConfigSchema, MutesPluginType } from "./types";
|
||||
import { MutesPluginType, zMutesConfig } from "./types";
|
||||
|
||||
const defaultOptions = {
|
||||
config: {
|
||||
|
@ -65,11 +65,11 @@ export const MutesPlugin = zeppelinGuildPlugin<MutesPluginType>()({
|
|||
showInDocs: true,
|
||||
info: {
|
||||
prettyName: "Mutes",
|
||||
configSchema: ConfigSchema,
|
||||
configSchema: zMutesConfig,
|
||||
},
|
||||
|
||||
dependencies: () => [CasesPlugin, LogsPlugin],
|
||||
configParser: makeIoTsConfigParser(ConfigSchema),
|
||||
configParser: (input) => zMutesConfig.parse(input),
|
||||
defaultOptions,
|
||||
|
||||
// prettier-ignore
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue