3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-18 07:35:02 +00:00

Some fixes and cleanup

This commit is contained in:
Dragory 2019-04-14 13:30:48 +03:00
parent 338855de15
commit 7f0833f699
3 changed files with 19 additions and 13 deletions

View file

@ -10,6 +10,7 @@ import {
findRelevantAuditLogEntry,
noop,
stripObjectToScalars,
unknownUser,
useMediaUrls,
} from "../utils";
import DefaultLogMessages from "../data/DefaultLogMessages.json";
@ -35,12 +36,6 @@ interface ILogChannelMap {
[channelId: string]: ILogChannel;
}
const unknownUser = {
id: 0,
username: "Unknown",
discriminator: "0000",
};
interface IChannelConfig {
include?: string[];
exclude?: string[];
@ -263,10 +258,14 @@ export class LogsPlugin extends ZeppelinPlugin<ILogsPluginConfig> {
);
const mod = relevantAuditLogEntry ? relevantAuditLogEntry.user : unknownUser;
this.guildLogs.log(LogType.MEMBER_BAN, {
mod: stripObjectToScalars(mod),
user: stripObjectToScalars(user),
}, user.id);
this.guildLogs.log(
LogType.MEMBER_BAN,
{
mod: stripObjectToScalars(mod),
user: stripObjectToScalars(user),
},
user.id,
);
}
@d.event("guildBanRemove")