3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-14 22:05:01 +00:00

feat: update knub; use base Knub types for plugins

This commit is contained in:
Dragory 2024-03-30 12:34:33 +00:00
parent 4597b83cda
commit c2ae6d53d8
No known key found for this signature in database
90 changed files with 713 additions and 607 deletions

View file

@ -1,4 +1,4 @@
import { CooldownManager, PluginOptions } from "knub";
import { CooldownManager, PluginOptions, guildPlugin } from "knub";
import DefaultLogMessages from "../../data/DefaultLogMessages.json";
import { GuildArchives } from "../../data/GuildArchives";
import { GuildCases } from "../../data/GuildCases";
@ -10,7 +10,6 @@ import { mapToPublicFn } from "../../pluginUtils";
import { discardRegExpRunner, getRegExpRunner } from "../../regExpRunners";
import { TypedTemplateSafeValueContainer, createTypedTemplateSafeValueContainer } from "../../templateFormatter";
import { TimeAndDatePlugin } from "../TimeAndDate/TimeAndDatePlugin";
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
import { LogsChannelCreateEvt, LogsChannelDeleteEvt, LogsChannelUpdateEvt } from "./events/LogsChannelModifyEvts";
import {
LogsEmojiCreateEvt,
@ -140,13 +139,8 @@ const defaultOptions: PluginOptions<LogsPluginType> = {
],
};
export const LogsPlugin = zeppelinGuildPlugin<LogsPluginType>()({
export const LogsPlugin = guildPlugin<LogsPluginType>()({
name: "logs",
showInDocs: true,
info: {
prettyName: "Logs",
configSchema: zLogsConfig,
},
dependencies: async () => [TimeAndDatePlugin, InternalPosterPlugin, (await getCasesPlugin()).CasesPlugin],
configParser: (input) => zLogsConfig.parse(input),

View file

@ -0,0 +1,8 @@
import { ZeppelinPluginInfo } from "../../types";
import { zLogsConfig } from "./types";
export const logsPluginInfo: ZeppelinPluginInfo = {
prettyName: "Logs",
configSchema: zLogsConfig,
showInDocs: true,
};