mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-08 03:27:20 +00:00
Merge branch 'master' of github.com:ZeppelinBot/Zeppelin into feat/application-commands
This commit is contained in:
commit
0be54912c4
164 changed files with 22402 additions and 25686 deletions
|
@ -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 { makePublicFn } from "../../pluginUtils";
|
||||
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,
|
||||
|
@ -52,12 +42,14 @@ export const TimeAndDatePlugin = zeppelinGuildPlugin<TimeAndDatePluginType>()({
|
|||
ViewTimezoneCmd,
|
||||
],
|
||||
|
||||
public: {
|
||||
getGuildTz: mapToPublicFn(getGuildTz),
|
||||
inGuildTz: mapToPublicFn(inGuildTz),
|
||||
getMemberTz: mapToPublicFn(getMemberTz),
|
||||
inMemberTz: mapToPublicFn(inMemberTz),
|
||||
getDateFormat: mapToPublicFn(getDateFormat),
|
||||
public(pluginData) {
|
||||
return {
|
||||
getGuildTz: makePublicFn(pluginData, getGuildTz),
|
||||
inGuildTz: makePublicFn(pluginData, inGuildTz),
|
||||
getMemberTz: makePublicFn(pluginData, getMemberTz),
|
||||
inMemberTz: makePublicFn(pluginData, inMemberTz),
|
||||
getDateFormat: makePublicFn(pluginData, getDateFormat),
|
||||
};
|
||||
},
|
||||
|
||||
beforeLoad(pluginData) {
|
||||
|
|
12
backend/src/plugins/TimeAndDate/info.ts
Normal file
12
backend/src/plugins/TimeAndDate/info.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
import { ZeppelinPluginInfo } from "../../types";
|
||||
import { trimPluginDescription } from "../../utils";
|
||||
import { zTimeAndDateConfig } from "./types";
|
||||
|
||||
export const timeAndDatePluginInfo: ZeppelinPluginInfo = {
|
||||
showInDocs: true,
|
||||
prettyName: "Time and date",
|
||||
description: trimPluginDescription(`
|
||||
Allows controlling the displayed time/date formats and timezones
|
||||
`),
|
||||
configSchema: zTimeAndDateConfig,
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue