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,8 +1,6 @@
import { PluginOptions } from "knub";
import { PluginOptions, guildPlugin } from "knub";
import { GuildMemberTimezones } from "../../data/GuildMemberTimezones";
import { mapToPublicFn } from "../../pluginUtils";
import { trimPluginDescription } from "../../utils";
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
import { ResetTimezoneCmd } from "./commands/ResetTimezoneCmd";
import { SetTimezoneCmd } from "./commands/SetTimezoneCmd";
import { ViewTimezoneCmd } from "./commands/ViewTimezoneCmd";
@ -31,16 +29,8 @@ const defaultOptions: PluginOptions<TimeAndDatePluginType> = {
],
};
export const TimeAndDatePlugin = zeppelinGuildPlugin<TimeAndDatePluginType>()({
export const TimeAndDatePlugin = guildPlugin<TimeAndDatePluginType>()({
name: "time_and_date",
showInDocs: true,
info: {
prettyName: "Time and date",
description: trimPluginDescription(`
Allows controlling the displayed time/date formats and timezones
`),
configSchema: zTimeAndDateConfig,
},
configParser: (input) => zTimeAndDateConfig.parse(input),
defaultOptions,