3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-25 10:25:01 +00:00
This commit is contained in:
metal 2021-09-23 09:43:30 +00:00 committed by almeidx
parent 3b98c3bdc1
commit 57b9540edf
No known key found for this signature in database
GPG key ID: F403F80B79353CB4
15 changed files with 57 additions and 20 deletions

View file

@ -9,6 +9,7 @@ import { MutesPlugin } from "../../Mutes/MutesPlugin";
import { MuteResult } from "../../Mutes/types";
import { ModActionsPluginType } from "../types";
import { formatReasonWithAttachments } from "./formatReasonWithAttachments";
import { parseReason } from "./parseReason";
import { readContactMethodsFromArgs } from "./readContactMethodsFromArgs";
/**
@ -42,7 +43,10 @@ export async function actualMuteUserCmd(
}
const timeUntilUnmute = args.time && humanizeDuration(args.time);
const reason = args.reason ? formatReasonWithAttachments(args.reason, [...msg.attachments.values()]) : undefined;
const config = pluginData.config.get();
const reason = args.reason
? parseReason(config, formatReasonWithAttachments(args.reason, [...msg.attachments.values()]))
: undefined;
let muteResult: MuteResult;
const mutesPlugin = pluginData.getPlugin(MutesPlugin);