mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-14 05:45:02 +00:00
Fixed mute command not updating case when no reason
This commit is contained in:
parent
0fee24e973
commit
174e5cc23b
1 changed files with 3 additions and 1 deletions
|
@ -246,10 +246,12 @@ export async function muteUser(
|
|||
if (theCase) {
|
||||
// Update old case
|
||||
const noteDetails = [`Mute updated to ${muteTime ? timeUntilUnmuteStr : "indefinite"}`];
|
||||
const reasons = reason ? [reason] : [];
|
||||
const reasons = reason ? [reason] : [""]; // Empty string so that there is a case update even without reason
|
||||
|
||||
if (muteOptions.caseArgs?.extraNotes) {
|
||||
reasons.push(...muteOptions.caseArgs.extraNotes);
|
||||
}
|
||||
|
||||
for (const noteReason of reasons) {
|
||||
await casesPlugin.createCaseNote({
|
||||
caseId: existingMute!.case_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue