mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-08 03:27:20 +00:00
chore: esm imports
This will make merging this into 'next' much easier.
This commit is contained in:
parent
1f0c7a4349
commit
45e3fe2ef0
798 changed files with 3633 additions and 3633 deletions
|
@ -1,17 +1,17 @@
|
|||
import { PluginOptions, guildPlugin } from "knub";
|
||||
import { GuildMemberTimezones } from "../../data/GuildMemberTimezones";
|
||||
import { makePublicFn } from "../../pluginUtils";
|
||||
import { CommonPlugin } from "../Common/CommonPlugin";
|
||||
import { ResetTimezoneCmd } from "./commands/ResetTimezoneCmd";
|
||||
import { SetTimezoneCmd } from "./commands/SetTimezoneCmd";
|
||||
import { ViewTimezoneCmd } from "./commands/ViewTimezoneCmd";
|
||||
import { defaultDateFormats } from "./defaultDateFormats";
|
||||
import { getDateFormat } from "./functions/getDateFormat";
|
||||
import { getGuildTz } from "./functions/getGuildTz";
|
||||
import { getMemberTz } from "./functions/getMemberTz";
|
||||
import { inGuildTz } from "./functions/inGuildTz";
|
||||
import { inMemberTz } from "./functions/inMemberTz";
|
||||
import { TimeAndDatePluginType, zTimeAndDateConfig } from "./types";
|
||||
import { GuildMemberTimezones } from "../../data/GuildMemberTimezones.js";
|
||||
import { makePublicFn } from "../../pluginUtils.js";
|
||||
import { CommonPlugin } from "../Common/CommonPlugin.js";
|
||||
import { ResetTimezoneCmd } from "./commands/ResetTimezoneCmd.js";
|
||||
import { SetTimezoneCmd } from "./commands/SetTimezoneCmd.js";
|
||||
import { ViewTimezoneCmd } from "./commands/ViewTimezoneCmd.js";
|
||||
import { defaultDateFormats } from "./defaultDateFormats.js";
|
||||
import { getDateFormat } from "./functions/getDateFormat.js";
|
||||
import { getGuildTz } from "./functions/getGuildTz.js";
|
||||
import { getMemberTz } from "./functions/getMemberTz.js";
|
||||
import { inGuildTz } from "./functions/inGuildTz.js";
|
||||
import { inMemberTz } from "./functions/inMemberTz.js";
|
||||
import { TimeAndDatePluginType, zTimeAndDateConfig } from "./types.js";
|
||||
|
||||
const defaultOptions: PluginOptions<TimeAndDatePluginType> = {
|
||||
config: {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { getGuildTz } from "../functions/getGuildTz";
|
||||
import { timeAndDateCmd } from "../types";
|
||||
import { getGuildTz } from "../functions/getGuildTz.js";
|
||||
import { timeAndDateCmd } from "../types.js";
|
||||
|
||||
export const ResetTimezoneCmd = timeAndDateCmd({
|
||||
trigger: "timezone reset",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { escapeInlineCode } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { trimLines } from "../../../utils";
|
||||
import { parseFuzzyTimezone } from "../../../utils/parseFuzzyTimezone";
|
||||
import { timeAndDateCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { trimLines } from "../../../utils.js";
|
||||
import { parseFuzzyTimezone } from "../../../utils/parseFuzzyTimezone.js";
|
||||
import { timeAndDateCmd } from "../types.js";
|
||||
|
||||
export const SetTimezoneCmd = timeAndDateCmd({
|
||||
trigger: "timezone",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { getGuildTz } from "../functions/getGuildTz";
|
||||
import { timeAndDateCmd } from "../types";
|
||||
import { getGuildTz } from "../functions/getGuildTz.js";
|
||||
import { timeAndDateCmd } from "../types.js";
|
||||
|
||||
export const ViewTimezoneCmd = timeAndDateCmd({
|
||||
trigger: "timezone",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { defaultDateFormats } from "../defaultDateFormats";
|
||||
import { TimeAndDatePluginType } from "../types";
|
||||
import { defaultDateFormats } from "../defaultDateFormats.js";
|
||||
import { TimeAndDatePluginType } from "../types.js";
|
||||
|
||||
export function getDateFormat(
|
||||
pluginData: GuildPluginData<TimeAndDatePluginType>,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { TimeAndDatePluginType } from "../types";
|
||||
import { TimeAndDatePluginType } from "../types.js";
|
||||
|
||||
export function getGuildTz(pluginData: GuildPluginData<TimeAndDatePluginType>) {
|
||||
return pluginData.config.get().timezone;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import { TimeAndDatePluginType } from "../types";
|
||||
import { getGuildTz } from "./getGuildTz";
|
||||
import { TimeAndDatePluginType } from "../types.js";
|
||||
import { getGuildTz } from "./getGuildTz.js";
|
||||
|
||||
export async function getMemberTz(pluginData: GuildPluginData<TimeAndDatePluginType>, memberId: string) {
|
||||
const memberTz = await pluginData.state.memberTimezones.get(memberId);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import moment from "moment-timezone";
|
||||
import { TimeAndDatePluginType } from "../types";
|
||||
import { getGuildTz } from "./getGuildTz";
|
||||
import { TimeAndDatePluginType } from "../types.js";
|
||||
import { getGuildTz } from "./getGuildTz.js";
|
||||
|
||||
export function inGuildTz(pluginData: GuildPluginData<TimeAndDatePluginType>, input?: moment.Moment | number) {
|
||||
let momentObj: moment.Moment;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { GuildPluginData } from "knub";
|
||||
import moment from "moment-timezone";
|
||||
import { TimeAndDatePluginType } from "../types";
|
||||
import { getMemberTz } from "./getMemberTz";
|
||||
import { TimeAndDatePluginType } from "../types.js";
|
||||
import { getMemberTz } from "./getMemberTz.js";
|
||||
|
||||
export async function inMemberTz(
|
||||
pluginData: GuildPluginData<TimeAndDatePluginType>,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { ZeppelinPluginInfo } from "../../types";
|
||||
import { trimPluginDescription } from "../../utils";
|
||||
import { zTimeAndDateConfig } from "./types";
|
||||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { trimPluginDescription } from "../../utils.js";
|
||||
import { zTimeAndDateConfig } from "./types.js";
|
||||
|
||||
export const timeAndDatePluginInfo: ZeppelinPluginInfo = {
|
||||
showInDocs: true,
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { BasePluginType, guildPluginMessageCommand, pluginUtils } from "knub";
|
||||
import { U } from "ts-toolbelt";
|
||||
import z from "zod";
|
||||
import { GuildMemberTimezones } from "../../data/GuildMemberTimezones";
|
||||
import { keys } from "../../utils";
|
||||
import { zValidTimezone } from "../../utils/zValidTimezone";
|
||||
import { CommonPlugin } from "../Common/CommonPlugin";
|
||||
import { defaultDateFormats } from "./defaultDateFormats";
|
||||
import { GuildMemberTimezones } from "../../data/GuildMemberTimezones.js";
|
||||
import { keys } from "../../utils.js";
|
||||
import { zValidTimezone } from "../../utils/zValidTimezone.js";
|
||||
import { CommonPlugin } from "../Common/CommonPlugin.js";
|
||||
import { defaultDateFormats } from "./defaultDateFormats.js";
|
||||
|
||||
const zDateFormatKeys = z.enum(keys(defaultDateFormats) as U.ListOf<keyof typeof defaultDateFormats>);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue