From cfc4536f518692d5887893250ae233f43b24bd6d Mon Sep 17 00:00:00 2001 From: Tiago R Date: Thu, 28 Dec 2023 10:55:02 +0000 Subject: [PATCH] fixes Signed-off-by: GitHub --- backend/src/plugins/ModActions/ModActionsPlugin.ts | 2 +- backend/src/plugins/ModActions/commands/AddCaseCmd.ts | 4 ++-- backend/src/plugins/ModActions/commands/ForcebanCmd.ts | 2 +- backend/src/plugins/ModActions/commands/MassUnbanCmd.ts | 2 +- backend/src/plugins/ModActions/commands/MassmuteCmd.ts | 2 +- backend/src/plugins/ModActions/commands/UnbanCmd.ts | 2 +- .../src/plugins/ModActions/functions/actualKickMemberCmd.ts | 2 +- backend/src/plugins/ModActions/functions/updateCase.ts | 6 +++--- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/backend/src/plugins/ModActions/ModActionsPlugin.ts b/backend/src/plugins/ModActions/ModActionsPlugin.ts index 5a197c542..8a19b273d 100644 --- a/backend/src/plugins/ModActions/ModActionsPlugin.ts +++ b/backend/src/plugins/ModActions/ModActionsPlugin.ts @@ -117,7 +117,7 @@ const defaultOptions = { /** * Config preprocessor to fix values */ -const configPreprocessor: ConfigPreprocessorFn = (options) => { +const configPreprocessor = (options) => { if (options.config?.reason_aliases) { options.config.reason_aliases = Object.fromEntries( Object.entries(options.config.reason_aliases).map(([k, v]) => [k.toLowerCase(), v]), diff --git a/backend/src/plugins/ModActions/commands/AddCaseCmd.ts b/backend/src/plugins/ModActions/commands/AddCaseCmd.ts index eb56453f1..2cef2246c 100644 --- a/backend/src/plugins/ModActions/commands/AddCaseCmd.ts +++ b/backend/src/plugins/ModActions/commands/AddCaseCmd.ts @@ -1,13 +1,13 @@ import { commandTypeHelpers as ct } from "../../../commandTypes"; import { CaseTypes } from "../../../data/CaseTypes"; import { Case } from "../../../data/entities/Case"; -import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin"; import { canActOn, hasPermission, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils"; +import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin"; import { renderUserUsername, resolveMember, resolveUser } from "../../../utils"; import { LogsPlugin } from "../../Logs/LogsPlugin"; import { formatReasonWithAttachments } from "../functions/formatReasonWithAttachments"; -import { modActionsCmd } from "../types"; import { parseReason } from "../functions/parseReason"; +import { modActionsCmd } from "../types"; const opts = { mod: ct.member({ option: true }), diff --git a/backend/src/plugins/ModActions/commands/ForcebanCmd.ts b/backend/src/plugins/ModActions/commands/ForcebanCmd.ts index 8fe67bd61..4ca098eb7 100644 --- a/backend/src/plugins/ModActions/commands/ForcebanCmd.ts +++ b/backend/src/plugins/ModActions/commands/ForcebanCmd.ts @@ -9,8 +9,8 @@ import { LogsPlugin } from "../../Logs/LogsPlugin"; import { formatReasonWithAttachments } from "../functions/formatReasonWithAttachments"; import { ignoreEvent } from "../functions/ignoreEvent"; import { isBanned } from "../functions/isBanned"; -import { IgnoredEventType, modActionsCmd } from "../types"; import { parseReason } from "../functions/parseReason"; +import { IgnoredEventType, modActionsCmd } from "../types"; const opts = { mod: ct.member({ option: true }), diff --git a/backend/src/plugins/ModActions/commands/MassUnbanCmd.ts b/backend/src/plugins/ModActions/commands/MassUnbanCmd.ts index fd2883b20..08bb3e199 100644 --- a/backend/src/plugins/ModActions/commands/MassUnbanCmd.ts +++ b/backend/src/plugins/ModActions/commands/MassUnbanCmd.ts @@ -9,8 +9,8 @@ import { LogsPlugin } from "../../Logs/LogsPlugin"; import { formatReasonWithAttachments } from "../functions/formatReasonWithAttachments"; import { ignoreEvent } from "../functions/ignoreEvent"; import { isBanned } from "../functions/isBanned"; -import { IgnoredEventType, modActionsCmd } from "../types"; import { parseReason } from "../functions/parseReason"; +import { IgnoredEventType, modActionsCmd } from "../types"; export const MassunbanCmd = modActionsCmd({ trigger: "massunban", diff --git a/backend/src/plugins/ModActions/commands/MassmuteCmd.ts b/backend/src/plugins/ModActions/commands/MassmuteCmd.ts index 6f49f8029..8f3c181c3 100644 --- a/backend/src/plugins/ModActions/commands/MassmuteCmd.ts +++ b/backend/src/plugins/ModActions/commands/MassmuteCmd.ts @@ -7,8 +7,8 @@ import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginU import { MutesPlugin } from "../../../plugins/Mutes/MutesPlugin"; import { LogsPlugin } from "../../Logs/LogsPlugin"; import { formatReasonWithAttachments } from "../functions/formatReasonWithAttachments"; -import { modActionsCmd } from "../types"; import { parseReason } from "../functions/parseReason"; +import { modActionsCmd } from "../types"; export const MassmuteCmd = modActionsCmd({ trigger: "massmute", diff --git a/backend/src/plugins/ModActions/commands/UnbanCmd.ts b/backend/src/plugins/ModActions/commands/UnbanCmd.ts index f93419ebf..aaaf05cb2 100644 --- a/backend/src/plugins/ModActions/commands/UnbanCmd.ts +++ b/backend/src/plugins/ModActions/commands/UnbanCmd.ts @@ -9,8 +9,8 @@ import { resolveUser } from "../../../utils"; import { LogsPlugin } from "../../Logs/LogsPlugin"; import { formatReasonWithAttachments } from "../functions/formatReasonWithAttachments"; import { ignoreEvent } from "../functions/ignoreEvent"; -import { IgnoredEventType, modActionsCmd } from "../types"; import { parseReason } from "../functions/parseReason"; +import { IgnoredEventType, modActionsCmd } from "../types"; const opts = { mod: ct.member({ option: true }), diff --git a/backend/src/plugins/ModActions/functions/actualKickMemberCmd.ts b/backend/src/plugins/ModActions/functions/actualKickMemberCmd.ts index 3ff5b8e72..98ff17a7e 100644 --- a/backend/src/plugins/ModActions/functions/actualKickMemberCmd.ts +++ b/backend/src/plugins/ModActions/functions/actualKickMemberCmd.ts @@ -1,4 +1,4 @@ -import { GuildMember, GuildTextBasedChannel } from "discord.js"; +import { GuildMember, GuildTextBasedChannel, Message, TextChannel } from "discord.js"; import { GuildPluginData } from "knub"; import { hasPermission } from "knub/helpers"; import { LogType } from "../../../data/LogType"; diff --git a/backend/src/plugins/ModActions/functions/updateCase.ts b/backend/src/plugins/ModActions/functions/updateCase.ts index 946122bc0..d6162117b 100644 --- a/backend/src/plugins/ModActions/functions/updateCase.ts +++ b/backend/src/plugins/ModActions/functions/updateCase.ts @@ -1,16 +1,16 @@ import { Message } from "discord.js"; +import { GuildPluginData } from "knub"; import { CaseTypes } from "../../../data/CaseTypes"; import { Case } from "../../../data/entities/Case"; import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils"; import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin"; import { LogsPlugin } from "../../Logs/LogsPlugin"; -import { parseReason } from "./parseReason.js"; -import { GuildPluginData } from "knub"; import { ModActionsPluginType } from "../types.js"; import { formatReasonWithAttachments } from "./formatReasonWithAttachments"; +import { parseReason } from "./parseReason.js"; export async function updateCase(pluginData: GuildPluginData, msg: Message, args) { - let theCase: Case | undefined; + let theCase: Case | null; if (args.caseNumber != null) { theCase = await pluginData.state.cases.findByCaseNumber(args.caseNumber); } else {