mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-08 03:27:20 +00:00
refactor: move defaults to config schemas
This commit is contained in:
parent
09eb8e92f2
commit
83d35052c3
91 changed files with 450 additions and 888 deletions
|
@ -16,18 +16,11 @@ import { LogsPlugin } from "../Logs/LogsPlugin.js";
|
|||
import { runEvent } from "./functions/runEvent.js";
|
||||
import { CustomEventsPluginType, zCustomEventsConfig } from "./types.js";
|
||||
|
||||
const defaultOptions = {
|
||||
config: {
|
||||
events: {},
|
||||
},
|
||||
};
|
||||
|
||||
export const CustomEventsPlugin = guildPlugin<CustomEventsPluginType>()({
|
||||
name: "custom_events",
|
||||
|
||||
dependencies: () => [LogsPlugin],
|
||||
configParser: (input) => zCustomEventsConfig.parse(input),
|
||||
defaultOptions,
|
||||
configSchema: zCustomEventsConfig,
|
||||
|
||||
beforeStart(pluginData) {
|
||||
pluginData.state.common = pluginData.getPlugin(CommonPlugin);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue