3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00
Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
Tiago R 2023-12-28 10:55:02 +00:00 committed by GitHub
parent f6b3df4dd1
commit cfc4536f51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 11 additions and 11 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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