3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-14 22:05:01 +00:00

refactor: convert /backend to ESM

This commit is contained in:
Dragory 2024-04-09 20:57:18 +03:00
parent 31d74c05aa
commit 5772e27cda
No known key found for this signature in database
766 changed files with 3473 additions and 3500 deletions

View file

@ -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>,

View file

@ -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;

View file

@ -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);

View file

@ -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;

View file

@ -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>,