3
0
Fork 0
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:
Dragory 2025-05-23 01:12:52 +00:00
parent 09eb8e92f2
commit 83d35052c3
No known key found for this signature in database
91 changed files with 450 additions and 888 deletions

View file

@ -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: [

View file

@ -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>;
};