mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-06-07 16:05:01 +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
|
@ -4,20 +4,11 @@ import { LogsPlugin } from "../Logs/LogsPlugin.js";
|
|||
import { SendWelcomeMessageEvt } from "./events/SendWelcomeMessageEvt.js";
|
||||
import { WelcomeMessagePluginType, zWelcomeMessageConfig } from "./types.js";
|
||||
|
||||
const defaultOptions: PluginOptions<WelcomeMessagePluginType> = {
|
||||
config: {
|
||||
send_dm: false,
|
||||
send_to_channel: null,
|
||||
message: null,
|
||||
},
|
||||
};
|
||||
|
||||
export const WelcomeMessagePlugin = guildPlugin<WelcomeMessagePluginType>()({
|
||||
name: "welcome_message",
|
||||
|
||||
dependencies: () => [LogsPlugin],
|
||||
configParser: (input) => zWelcomeMessageConfig.parse(input),
|
||||
defaultOptions,
|
||||
configSchema: zWelcomeMessageConfig,
|
||||
|
||||
// prettier-ignore
|
||||
events: [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue