mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
fixes
Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
parent
f6b3df4dd1
commit
cfc4536f51
8 changed files with 11 additions and 11 deletions
|
@ -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]),
|
||||
|
|
|
@ -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 }),
|
||||
|
|
|
@ -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 }),
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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 }),
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue