mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 14:11:50 +00:00
Add 'reason' variable to mod action logs
This commit is contained in:
parent
dca678989e
commit
a608fe0163
2 changed files with 11 additions and 0 deletions
|
@ -486,6 +486,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
this.serverLogs.log(LogType.MEMBER_KICK, {
|
this.serverLogs.log(LogType.MEMBER_KICK, {
|
||||||
mod: stripObjectToScalars(mod),
|
mod: stripObjectToScalars(mod),
|
||||||
user: stripObjectToScalars(member.user),
|
user: stripObjectToScalars(member.user),
|
||||||
|
reason,
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -545,6 +546,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
this.serverLogs.log(LogType.MEMBER_BAN, {
|
this.serverLogs.log(LogType.MEMBER_BAN, {
|
||||||
mod: stripObjectToScalars(mod),
|
mod: stripObjectToScalars(mod),
|
||||||
user: stripObjectToScalars(user),
|
user: stripObjectToScalars(user),
|
||||||
|
reason,
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -770,6 +772,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
this.serverLogs.log(LogType.MEMBER_WARN, {
|
this.serverLogs.log(LogType.MEMBER_WARN, {
|
||||||
mod: stripObjectToScalars(mod),
|
mod: stripObjectToScalars(mod),
|
||||||
member: stripObjectToScalars(member, ["user", "roles"]),
|
member: stripObjectToScalars(member, ["user", "roles"]),
|
||||||
|
reason,
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -1386,6 +1389,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
this.serverLogs.log(LogType.MEMBER_UNBAN, {
|
this.serverLogs.log(LogType.MEMBER_UNBAN, {
|
||||||
mod: stripObjectToScalars(mod.user),
|
mod: stripObjectToScalars(mod.user),
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
|
reason,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1456,6 +1460,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
this.serverLogs.log(LogType.MEMBER_FORCEBAN, {
|
this.serverLogs.log(LogType.MEMBER_FORCEBAN, {
|
||||||
mod: stripObjectToScalars(mod.user),
|
mod: stripObjectToScalars(mod.user),
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
|
reason,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1535,6 +1540,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
this.serverLogs.log(LogType.MASSBAN, {
|
this.serverLogs.log(LogType.MASSBAN, {
|
||||||
mod: stripObjectToScalars(msg.author),
|
mod: stripObjectToScalars(msg.author),
|
||||||
count: successfulBanCount,
|
count: successfulBanCount,
|
||||||
|
reason: banReason,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (failedBans.length) {
|
if (failedBans.length) {
|
||||||
|
@ -1613,6 +1619,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
caseNum: theCase.case_number,
|
caseNum: theCase.case_number,
|
||||||
caseType: type.toUpperCase(),
|
caseType: type.toUpperCase(),
|
||||||
|
reason,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -277,11 +277,13 @@ export class MutesPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
mod: stripObjectToScalars(mod),
|
mod: stripObjectToScalars(mod),
|
||||||
user: stripObjectToScalars(user),
|
user: stripObjectToScalars(user),
|
||||||
time: timeUntilUnmute,
|
time: timeUntilUnmute,
|
||||||
|
reason,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.serverLogs.log(LogType.MEMBER_MUTE, {
|
this.serverLogs.log(LogType.MEMBER_MUTE, {
|
||||||
mod: stripObjectToScalars(mod),
|
mod: stripObjectToScalars(mod),
|
||||||
user: stripObjectToScalars(user),
|
user: stripObjectToScalars(user),
|
||||||
|
reason,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -356,11 +358,13 @@ export class MutesPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
mod: stripObjectToScalars(mod),
|
mod: stripObjectToScalars(mod),
|
||||||
user: stripObjectToScalars(user),
|
user: stripObjectToScalars(user),
|
||||||
time: timeUntilUnmute,
|
time: timeUntilUnmute,
|
||||||
|
reason: caseArgs.reason,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.serverLogs.log(LogType.MEMBER_UNMUTE, {
|
this.serverLogs.log(LogType.MEMBER_UNMUTE, {
|
||||||
mod: stripObjectToScalars(mod),
|
mod: stripObjectToScalars(mod),
|
||||||
user: stripObjectToScalars(user),
|
user: stripObjectToScalars(user),
|
||||||
|
reason: caseArgs.reason,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue