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:
parent
31d74c05aa
commit
5772e27cda
766 changed files with 3473 additions and 3500 deletions
|
@ -1,12 +1,12 @@
|
|||
import { PluginOptions, guildPlugin } from "knub";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { LogsPlugin } from "../Logs/LogsPlugin";
|
||||
import { RoleManagerPlugin } from "../RoleManager/RoleManagerPlugin";
|
||||
import { AddRoleCmd } from "./commands/AddRoleCmd";
|
||||
import { MassAddRoleCmd } from "./commands/MassAddRoleCmd";
|
||||
import { MassRemoveRoleCmd } from "./commands/MassRemoveRoleCmd";
|
||||
import { RemoveRoleCmd } from "./commands/RemoveRoleCmd";
|
||||
import { RolesPluginType, zRolesConfig } from "./types";
|
||||
import { GuildLogs } from "../../data/GuildLogs.js";
|
||||
import { LogsPlugin } from "../Logs/LogsPlugin.js";
|
||||
import { RoleManagerPlugin } from "../RoleManager/RoleManagerPlugin.js";
|
||||
import { AddRoleCmd } from "./commands/AddRoleCmd.js";
|
||||
import { MassAddRoleCmd } from "./commands/MassAddRoleCmd.js";
|
||||
import { MassRemoveRoleCmd } from "./commands/MassRemoveRoleCmd.js";
|
||||
import { RemoveRoleCmd } from "./commands/RemoveRoleCmd.js";
|
||||
import { RolesPluginType, zRolesConfig } from "./types.js";
|
||||
|
||||
const defaultOptions: PluginOptions<RolesPluginType> = {
|
||||
config: {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { GuildChannel } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { resolveRoleId, verboseUserMention } from "../../../utils";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { RoleManagerPlugin } from "../../RoleManager/RoleManagerPlugin";
|
||||
import { rolesCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils.js";
|
||||
import { resolveRoleId, verboseUserMention } from "../../../utils.js";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin.js";
|
||||
import { RoleManagerPlugin } from "../../RoleManager/RoleManagerPlugin.js";
|
||||
import { rolesCmd } from "../types.js";
|
||||
|
||||
export const AddRoleCmd = rolesCmd({
|
||||
trigger: "addrole",
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { GuildMember } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { logger } from "../../../logger";
|
||||
import { canActOn, sendErrorMessage } from "../../../pluginUtils";
|
||||
import { resolveMember, resolveRoleId, successMessage } from "../../../utils";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { RoleManagerPlugin } from "../../RoleManager/RoleManagerPlugin";
|
||||
import { rolesCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { logger } from "../../../logger.js";
|
||||
import { canActOn, sendErrorMessage } from "../../../pluginUtils.js";
|
||||
import { resolveMember, resolveRoleId, successMessage } from "../../../utils.js";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin.js";
|
||||
import { RoleManagerPlugin } from "../../RoleManager/RoleManagerPlugin.js";
|
||||
import { rolesCmd } from "../types.js";
|
||||
|
||||
export const MassAddRoleCmd = rolesCmd({
|
||||
trigger: "massaddrole",
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { GuildMember } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { canActOn, sendErrorMessage } from "../../../pluginUtils";
|
||||
import { resolveMember, resolveRoleId, successMessage } from "../../../utils";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { RoleManagerPlugin } from "../../RoleManager/RoleManagerPlugin";
|
||||
import { rolesCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { canActOn, sendErrorMessage } from "../../../pluginUtils.js";
|
||||
import { resolveMember, resolveRoleId, successMessage } from "../../../utils.js";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin.js";
|
||||
import { RoleManagerPlugin } from "../../RoleManager/RoleManagerPlugin.js";
|
||||
import { rolesCmd } from "../types.js";
|
||||
|
||||
export const MassRemoveRoleCmd = rolesCmd({
|
||||
trigger: "massremoverole",
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { GuildChannel } from "discord.js";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { resolveRoleId, verboseUserMention } from "../../../utils";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
import { RoleManagerPlugin } from "../../RoleManager/RoleManagerPlugin";
|
||||
import { rolesCmd } from "../types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes.js";
|
||||
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils.js";
|
||||
import { resolveRoleId, verboseUserMention } from "../../../utils.js";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin.js";
|
||||
import { RoleManagerPlugin } from "../../RoleManager/RoleManagerPlugin.js";
|
||||
import { rolesCmd } from "../types.js";
|
||||
|
||||
export const RemoveRoleCmd = rolesCmd({
|
||||
trigger: "removerole",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { ZeppelinPluginInfo } from "../../types";
|
||||
import { trimPluginDescription } from "../../utils";
|
||||
import { zRolesConfig } from "./types";
|
||||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { trimPluginDescription } from "../../utils.js";
|
||||
import { zRolesConfig } from "./types.js";
|
||||
|
||||
export const rolesPluginInfo: ZeppelinPluginInfo = {
|
||||
showInDocs: true,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { BasePluginType, guildPluginMessageCommand } from "knub";
|
||||
import z from "zod";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildLogs } from "../../data/GuildLogs.js";
|
||||
|
||||
export const zRolesConfig = z.strictObject({
|
||||
can_assign: z.boolean(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue