Add postInCaseLog option for mod action Automod actions; allow forcing case log even when log_automatic_actions is disabled
This commit is contained in:
parent
aa43f05173
commit
45e81848a7
7 changed files with 18 additions and 13 deletions
|
@ -188,8 +188,6 @@ export async function muteUser(
|
|||
|
||||
if (theCase) {
|
||||
// Update old case
|
||||
// Since mutes can often have multiple notes (extraNotes), we won't post each case note individually,
|
||||
// but instead we'll post the entire case afterwards
|
||||
const noteDetails = [`Mute updated to ${muteTime ? timeUntilUnmute : "indefinite"}`];
|
||||
const reasons = reason ? [reason] : [];
|
||||
if (muteOptions.caseArgs?.extraNotes) {
|
||||
|
@ -201,13 +199,9 @@ export async function muteUser(
|
|||
modId: muteOptions.caseArgs?.modId,
|
||||
body: noteReason,
|
||||
noteDetails,
|
||||
postInCaseLogOverride: false,
|
||||
postInCaseLogOverride: muteOptions.caseArgs?.postInCaseLogOverride,
|
||||
});
|
||||
}
|
||||
|
||||
if (muteOptions.caseArgs?.postInCaseLogOverride !== false) {
|
||||
casesPlugin.postCaseToCaseLogChannel(existingMute!.case_id);
|
||||
}
|
||||
} else {
|
||||
// Create new case
|
||||
const noteDetails = [`Muted ${muteTime ? `for ${timeUntilUnmute}` : "indefinitely"}`];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue