mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-08 03:27:20 +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
|
@ -3,12 +3,11 @@ import { GuildArchives } from "../../data/GuildArchives";
|
|||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildMutes } from "../../data/GuildMutes";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { makeIoTsConfigParser } from "../../pluginUtils";
|
||||
import { trimPluginDescription } from "../../utils";
|
||||
import { LogsPlugin } from "../Logs/LogsPlugin";
|
||||
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
|
||||
import { SpamVoiceStateUpdateEvt } from "./events/SpamVoiceEvt";
|
||||
import { ConfigSchema, SpamPluginType } from "./types";
|
||||
import { SpamPluginType, zSpamConfig } from "./types";
|
||||
import { clearOldRecentActions } from "./util/clearOldRecentActions";
|
||||
import { onMessageCreate } from "./util/onMessageCreate";
|
||||
|
||||
|
@ -53,11 +52,11 @@ export const SpamPlugin = zeppelinGuildPlugin<SpamPluginType>()({
|
|||
For more advanced spam filtering, check out the Automod plugin!
|
||||
`),
|
||||
legacy: true,
|
||||
configSchema: ConfigSchema,
|
||||
configSchema: zSpamConfig,
|
||||
},
|
||||
|
||||
dependencies: () => [LogsPlugin],
|
||||
configParser: makeIoTsConfigParser(ConfigSchema),
|
||||
configParser: (input) => zSpamConfig.parse(input),
|
||||
defaultOptions,
|
||||
|
||||
// prettier-ignore
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue