mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 14:11:50 +00:00
Fix right click bans causing logs with the banned user's username missing
This commit is contained in:
parent
fe88766f02
commit
434758b8ad
3 changed files with 8 additions and 12 deletions
|
@ -5,8 +5,8 @@
|
||||||
"MEMBER_UNMUTE": "🔊 {userMention(member)} was unmuted by {userMention(mod)}",
|
"MEMBER_UNMUTE": "🔊 {userMention(member)} was unmuted by {userMention(mod)}",
|
||||||
"MEMBER_TIMED_UNMUTE": "🔊 {userMention(member)} was scheduled to be unmuted in **{time}** by {userMention(mod)}",
|
"MEMBER_TIMED_UNMUTE": "🔊 {userMention(member)} was scheduled to be unmuted in **{time}** by {userMention(mod)}",
|
||||||
"MEMBER_MUTE_EXPIRED": "🔊 {userMention(member)}'s mute expired",
|
"MEMBER_MUTE_EXPIRED": "🔊 {userMention(member)}'s mute expired",
|
||||||
"MEMBER_KICK": "👢 {userMention(member)} was kicked by {userMention(mod)}",
|
"MEMBER_KICK": "👢 {userMention(user)} was kicked by {userMention(mod)}",
|
||||||
"MEMBER_BAN": "🔨 {userMention(member)} was banned by {userMention(mod)}",
|
"MEMBER_BAN": "🔨 {userMention(user)} was banned by {userMention(mod)}",
|
||||||
"MEMBER_UNBAN": "🔓 User (`{userId}`) was unbanned by {userMention(mod)}",
|
"MEMBER_UNBAN": "🔓 User (`{userId}`) was unbanned by {userMention(mod)}",
|
||||||
"MEMBER_FORCEBAN": "🔨 User (`{userId}`) was forcebanned by {userMention(mod)}",
|
"MEMBER_FORCEBAN": "🔨 User (`{userId}`) was forcebanned by {userMention(mod)}",
|
||||||
"MEMBER_SOFTBAN": "🔨 {userMention(member)} was softbanned by {userMention(mod)}",
|
"MEMBER_SOFTBAN": "🔨 {userMention(member)} was softbanned by {userMention(mod)}",
|
||||||
|
|
|
@ -263,14 +263,10 @@ export class LogsPlugin extends ZeppelinPlugin<ILogsPluginConfig> {
|
||||||
);
|
);
|
||||||
const mod = relevantAuditLogEntry ? relevantAuditLogEntry.user : unknownUser;
|
const mod = relevantAuditLogEntry ? relevantAuditLogEntry.user : unknownUser;
|
||||||
|
|
||||||
this.guildLogs.log(
|
this.guildLogs.log(LogType.MEMBER_BAN, {
|
||||||
LogType.MEMBER_BAN,
|
mod: stripObjectToScalars(mod),
|
||||||
{
|
user: stripObjectToScalars(user),
|
||||||
user: stripObjectToScalars(user),
|
}, user.id);
|
||||||
mod: stripObjectToScalars(mod),
|
|
||||||
},
|
|
||||||
user.id,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@d.event("guildBanRemove")
|
@d.event("guildBanRemove")
|
||||||
|
|
|
@ -610,7 +610,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<IModActionsPluginConfig> {
|
||||||
// Log the action
|
// Log the action
|
||||||
this.serverLogs.log(LogType.MEMBER_KICK, {
|
this.serverLogs.log(LogType.MEMBER_KICK, {
|
||||||
mod: stripObjectToScalars(mod.user),
|
mod: stripObjectToScalars(mod.user),
|
||||||
member: stripObjectToScalars(args.member, ["user"]),
|
user: stripObjectToScalars(args.member.user),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -679,7 +679,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<IModActionsPluginConfig> {
|
||||||
// Log the action
|
// Log the action
|
||||||
this.serverLogs.log(LogType.MEMBER_BAN, {
|
this.serverLogs.log(LogType.MEMBER_BAN, {
|
||||||
mod: stripObjectToScalars(mod.user),
|
mod: stripObjectToScalars(mod.user),
|
||||||
member: stripObjectToScalars(args.member, ["user"]),
|
user: stripObjectToScalars(args.member.user),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue