mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 04:25: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,9 +1,8 @@
|
|||
import { PluginOptions } from "knub";
|
||||
import { PluginOptions, guildPlugin } from "knub";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildSavedMessages } from "../../data/GuildSavedMessages";
|
||||
import { LogsPlugin } from "../Logs/LogsPlugin";
|
||||
import { TimeAndDatePlugin } from "../TimeAndDate/TimeAndDatePlugin";
|
||||
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
|
||||
import { AutoDeletePluginType, zAutoDeleteConfig } from "./types";
|
||||
import { onMessageCreate } from "./util/onMessageCreate";
|
||||
import { onMessageDelete } from "./util/onMessageDelete";
|
||||
|
@ -16,15 +15,8 @@ const defaultOptions: PluginOptions<AutoDeletePluginType> = {
|
|||
},
|
||||
};
|
||||
|
||||
export const AutoDeletePlugin = zeppelinGuildPlugin<AutoDeletePluginType>()({
|
||||
export const AutoDeletePlugin = guildPlugin<AutoDeletePluginType>()({
|
||||
name: "auto_delete",
|
||||
showInDocs: true,
|
||||
info: {
|
||||
prettyName: "Auto-delete",
|
||||
description: "Allows Zeppelin to auto-delete messages from a channel after a delay",
|
||||
configurationGuide: "Maximum deletion delay is currently 5 minutes",
|
||||
configSchema: zAutoDeleteConfig,
|
||||
} as any,
|
||||
|
||||
dependencies: () => [TimeAndDatePlugin, LogsPlugin],
|
||||
configParser: (input) => zAutoDeleteConfig.parse(input),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue