mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Allow for caseNumber in Logs, showing the case number - repalce log evts
This commit is contained in:
parent
6caf7b1304
commit
e131c77e20
13 changed files with 51 additions and 64 deletions
|
@ -15,6 +15,7 @@ import { TextChannel, User } from "eris";
|
|||
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
||||
import { CaseTypes } from "../../../data/CaseTypes";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { Case } from "src/data/entities/Case";
|
||||
|
||||
export async function muteUser(
|
||||
pluginData: PluginData<MutesPluginType>,
|
||||
|
@ -106,7 +107,7 @@ export async function muteUser(
|
|||
|
||||
// Create/update a case
|
||||
const casesPlugin = pluginData.getPlugin(CasesPlugin);
|
||||
let theCase;
|
||||
let theCase: Case;
|
||||
|
||||
if (existingMute && existingMute.case_id) {
|
||||
// Update old case
|
||||
|
@ -153,12 +154,14 @@ export async function muteUser(
|
|||
mod: stripObjectToScalars(mod),
|
||||
user: stripObjectToScalars(user),
|
||||
time: timeUntilUnmute,
|
||||
caseNumber: theCase.case_number,
|
||||
reason,
|
||||
});
|
||||
} else {
|
||||
pluginData.state.serverLogs.log(LogType.MEMBER_MUTE, {
|
||||
mod: stripObjectToScalars(mod),
|
||||
user: stripObjectToScalars(user),
|
||||
caseNumber: theCase.case_number,
|
||||
reason,
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue