3
0
Fork 0
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:
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,9 +1,7 @@
import { PluginOptions } from "knub";
import { PluginOptions, guildPlugin } from "knub";
import { GuildLogs } from "../../data/GuildLogs";
import { trimPluginDescription } from "../../utils";
import { LogsPlugin } from "../Logs/LogsPlugin";
import { RoleManagerPlugin } from "../RoleManager/RoleManagerPlugin";
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
import { AddRoleCmd } from "./commands/AddRoleCmd";
import { MassAddRoleCmd } from "./commands/MassAddRoleCmd";
import { MassRemoveRoleCmd } from "./commands/MassRemoveRoleCmd";
@ -32,16 +30,8 @@ const defaultOptions: PluginOptions<RolesPluginType> = {
],
};
export const RolesPlugin = zeppelinGuildPlugin<RolesPluginType>()({
export const RolesPlugin = guildPlugin<RolesPluginType>()({
name: "roles",
showInDocs: true,
info: {
prettyName: "Roles",
description: trimPluginDescription(`
Enables authorised users to add and remove whitelisted roles with a command.
`),
configSchema: zRolesConfig,
},
dependencies: () => [LogsPlugin, RoleManagerPlugin],
configParser: (input) => zRolesConfig.parse(input),