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:
parent
4597b83cda
commit
c2ae6d53d8
90 changed files with 713 additions and 607 deletions
|
@ -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),
|
||||
|
|
8
backend/src/plugins/Logs/info.ts
Normal file
8
backend/src/plugins/Logs/info.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { ZeppelinPluginInfo } from "../../types";
|
||||
import { zLogsConfig } from "./types";
|
||||
|
||||
export const logsPluginInfo: ZeppelinPluginInfo = {
|
||||
prettyName: "Logs",
|
||||
configSchema: zLogsConfig,
|
||||
showInDocs: true,
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue