Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
Signed-off-by: GitHub <[email protected]>
  • Loading branch information
metal0 authored Dec 28, 2023
1 parent f6b3df4 commit cfc4536
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion backend/src/plugins/ModActions/ModActionsPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const defaultOptions = {
/**
* Config preprocessor to fix values
*/
const configPreprocessor: ConfigPreprocessorFn<ModActionsPluginType> = (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]),
Expand Down
4 changes: 2 additions & 2 deletions backend/src/plugins/ModActions/commands/AddCaseCmd.ts
Original file line number Diff line number Diff line change
@@ -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 }),
Expand Down
2 changes: 1 addition & 1 deletion backend/src/plugins/ModActions/commands/ForcebanCmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }),
Expand Down
2 changes: 1 addition & 1 deletion backend/src/plugins/ModActions/commands/MassUnbanCmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion backend/src/plugins/ModActions/commands/MassmuteCmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion backend/src/plugins/ModActions/commands/UnbanCmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }),
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
6 changes: 3 additions & 3 deletions backend/src/plugins/ModActions/functions/updateCase.ts
Original file line number Diff line number Diff line change
@@ -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<ModActionsPluginType>, msg: Message, args) {
let theCase: Case | undefined;
let theCase: Case | null;
if (args.caseNumber != null) {
theCase = await pluginData.state.cases.findByCaseNumber(args.caseNumber);
} else {
Expand Down

0 comments on commit cfc4536

Please sign in to comment.