mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-07 19:17:19 +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
|
@ -1,15 +1,14 @@
|
|||
import { guildPlugin } from "knub";
|
||||
import z from "zod/v4";
|
||||
import { CommonPlugin } from "../Common/CommonPlugin.js";
|
||||
import { TimeAndDatePlugin } from "../TimeAndDate/TimeAndDatePlugin.js";
|
||||
import { ArchiveChannelCmd } from "./commands/ArchiveChannelCmd.js";
|
||||
import { ChannelArchiverPluginType } from "./types.js";
|
||||
import { ChannelArchiverPluginType, zChannelArchiverPluginConfig } from "./types.js";
|
||||
|
||||
export const ChannelArchiverPlugin = guildPlugin<ChannelArchiverPluginType>()({
|
||||
name: "channel_archiver",
|
||||
|
||||
dependencies: () => [TimeAndDatePlugin],
|
||||
configParser: (input) => z.strictObject({}).parse(input),
|
||||
configSchema: zChannelArchiverPluginConfig,
|
||||
|
||||
// prettier-ignore
|
||||
messageCommands: [
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
import { BasePluginType, guildPluginMessageCommand, pluginUtils } from "knub";
|
||||
import { CommonPlugin } from "../Common/CommonPlugin.js";
|
||||
import { z } from "zod/v4";
|
||||
|
||||
export const zChannelArchiverPluginConfig = z.strictObject({});
|
||||
|
||||
export interface ChannelArchiverPluginType extends BasePluginType {
|
||||
configSchema: typeof zChannelArchiverPluginConfig;
|
||||
state: {
|
||||
common: pluginUtils.PluginPublicInterface<typeof CommonPlugin>;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue