3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-07-07 19:17:19 +00:00

mod actions reason aliases

Co-authored-by: metal0 <metal@i0.tf>
This commit is contained in:
almeidx 2023-12-28 10:40:05 +00:00
parent 3b98c3bdc1
commit 80c195f25e
No known key found for this signature in database
GPG key ID: 54402591B9053451
16 changed files with 92 additions and 34 deletions

View file

@ -1,5 +1,4 @@
import { Snowflake } from "discord.js";
import { userToTemplateSafeUser } from "../../../utils/templateSafeObjects";
import { commandTypeHelpers as ct } from "../../../commandTypes";
import { CaseTypes } from "../../../data/CaseTypes";
import { LogType } from "../../../data/LogType";
@ -11,6 +10,7 @@ import { ignoreEvent } from "../functions/ignoreEvent";
import { IgnoredEventType, modActionsCmd } from "../types";
import { LogsPlugin } from "../../Logs/LogsPlugin";
import { clearExpiringTempban } from "../../../data/loops/expiringTempbansLoop";
import { parseReason } from "../functions/parseReason";
const opts = {
mod: ct.member({ option: true }),
@ -49,7 +49,8 @@ export const UnbanCmd = modActionsCmd({
}
pluginData.state.serverLogs.ignoreLog(LogType.MEMBER_UNBAN, user.id);
const reason = formatReasonWithAttachments(args.reason, [...msg.attachments.values()]);
const config = pluginData.config.get();
const reason = formatReasonWithAttachments(parseReason(config, args.reason), [...msg.attachments.values()]);
try {
ignoreEvent(pluginData, IgnoredEventType.Unban, user.id);