mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-06-08 08:05:03 +00:00
refactor: convert /backend to ESM
This commit is contained in:
parent
31d74c05aa
commit
5772e27cda
766 changed files with 3473 additions and 3500 deletions
|
@ -1,11 +1,11 @@
|
|||
import { PluginOptions, guildPlugin } from "knub";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildPersistedData } from "../../data/GuildPersistedData";
|
||||
import { LogsPlugin } from "../Logs/LogsPlugin";
|
||||
import { RoleManagerPlugin } from "../RoleManager/RoleManagerPlugin";
|
||||
import { LoadDataEvt } from "./events/LoadDataEvt";
|
||||
import { StoreDataEvt } from "./events/StoreDataEvt";
|
||||
import { PersistPluginType, zPersistConfig } from "./types";
|
||||
import { GuildLogs } from "../../data/GuildLogs.js";
|
||||
import { GuildPersistedData } from "../../data/GuildPersistedData.js";
|
||||
import { LogsPlugin } from "../Logs/LogsPlugin.js";
|
||||
import { RoleManagerPlugin } from "../RoleManager/RoleManagerPlugin.js";
|
||||
import { LoadDataEvt } from "./events/LoadDataEvt.js";
|
||||
import { StoreDataEvt } from "./events/StoreDataEvt.js";
|
||||
import { PersistPluginType, zPersistConfig } from "./types.js";
|
||||
|
||||
const defaultOptions: PluginOptions<PersistPluginType> = {
|
||||
config: {
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
import { GuildMember, PermissionFlagsBits } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import intersection from "lodash.intersection";
|
||||
import { PersistedData } from "../../../data/entities/PersistedData";
|
||||
import { SECONDS } from "../../../utils";
|
||||
import { canAssignRole } from "../../../utils/canAssignRole";
|
||||
import { getMissingPermissions } from "../../../utils/getMissingPermissions";
|
||||
import { missingPermissionError } from "../../../utils/missingPermissionError";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { RoleManagerPlugin } from "../../RoleManager/RoleManagerPlugin";
|
||||
import { PersistPluginType, persistEvt } from "../types";
|
||||
import intersection from "lodash/intersection.js";
|
||||
import { PersistedData } from "../../../data/entities/PersistedData.js";
|
||||
import { SECONDS } from "../../../utils.js";
|
||||
import { canAssignRole } from "../../../utils/canAssignRole.js";
|
||||
import { getMissingPermissions } from "../../../utils/getMissingPermissions.js";
|
||||
import { missingPermissionError } from "../../../utils/missingPermissionError.js";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin.js";
|
||||
import { RoleManagerPlugin } from "../../RoleManager/RoleManagerPlugin.js";
|
||||
import { PersistPluginType, persistEvt } from "../types.js";
|
||||
|
||||
const p = PermissionFlagsBits;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { PersistedData } from "../../../data/entities/PersistedData";
|
||||
import { persistEvt } from "../types";
|
||||
import { PersistedData } from "../../../data/entities/PersistedData.js";
|
||||
import { persistEvt } from "../types.js";
|
||||
|
||||
export const StoreDataEvt = persistEvt({
|
||||
event: "guildMemberRemove",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { ZeppelinPluginInfo } from "../../types";
|
||||
import { trimPluginDescription } from "../../utils";
|
||||
import { zPersistConfig } from "./types";
|
||||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { trimPluginDescription } from "../../utils.js";
|
||||
import { zPersistConfig } from "./types.js";
|
||||
|
||||
export const persistPluginInfo: ZeppelinPluginInfo = {
|
||||
prettyName: "Persist",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { BasePluginType, guildPluginEventListener } from "knub";
|
||||
import z from "zod";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildPersistedData } from "../../data/GuildPersistedData";
|
||||
import { zSnowflake } from "../../utils";
|
||||
import { GuildLogs } from "../../data/GuildLogs.js";
|
||||
import { GuildPersistedData } from "../../data/GuildPersistedData.js";
|
||||
import { zSnowflake } from "../../utils.js";
|
||||
|
||||
export const zPersistConfig = z.strictObject({
|
||||
persisted_roles: z.array(zSnowflake),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue