mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-12 21:05:02 +00:00
Add time_and_date plugin. Use it for timezones and date formats around the bot.
This commit is contained in:
parent
cffb0dbd6b
commit
4ae8cf85a3
67 changed files with 543 additions and 177 deletions
|
@ -1,19 +1,13 @@
|
|||
import { BaseConfig, Knub } from "knub";
|
||||
import * as t from "io-ts";
|
||||
|
||||
export const DateFormatsSchema = t.type({
|
||||
date: t.string,
|
||||
time: t.string,
|
||||
pretty_datetime: t.string,
|
||||
});
|
||||
|
||||
export type DateFormats = t.TypeOf<typeof DateFormatsSchema>;
|
||||
|
||||
export interface ZeppelinGuildConfig extends BaseConfig<any> {
|
||||
success_emoji?: string;
|
||||
error_emoji?: string;
|
||||
|
||||
// Deprecated
|
||||
timezone?: string;
|
||||
date_formats?: Partial<DateFormats>;
|
||||
date_formats?: any;
|
||||
}
|
||||
|
||||
export const ZeppelinGuildConfigSchema = t.type({
|
||||
|
@ -25,8 +19,10 @@ export const ZeppelinGuildConfigSchema = t.type({
|
|||
// From ZeppelinGuildConfig
|
||||
success_emoji: t.string,
|
||||
error_emoji: t.string,
|
||||
|
||||
// Deprecated
|
||||
timezone: t.string,
|
||||
date_formats: t.partial(DateFormatsSchema.props),
|
||||
date_formats: t.unknown,
|
||||
});
|
||||
export const PartialZeppelinGuildConfigSchema = t.partial(ZeppelinGuildConfigSchema.props);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue