Development (#11)

We need this NOW.

---------

Co-authored-by: PineaFan <ash@pinea.dev>
Co-authored-by: pineafan <pineapplefanyt@gmail.com>
Co-authored-by: PineappleFan <PineaFan@users.noreply.github.com>
Co-authored-by: Skyler <skyler3665@gmail.com>
diff --git a/src/events/guildBanAdd.ts b/src/events/guildBanAdd.ts
index 3d96245..cac4b41 100644
--- a/src/events/guildBanAdd.ts
+++ b/src/events/guildBanAdd.ts
@@ -7,10 +7,11 @@
 export const event = "guildBanAdd";
 
 export async function callback(client: NucleusClient, ban: GuildBan) {
+    const { log, isLogging, NucleusColors, entry, renderUser, renderDelta, getAuditLog } = client.logger;
     await statsChannelRemove(client, undefined, ban.guild, ban.user);
     purgeByUser(ban.user.id, ban.guild.id);
-    const { log, NucleusColors, entry, renderUser, renderDelta, getAuditLog } = client.logger;
-    const auditLog: GuildAuditLogsEntry | undefined = (await getAuditLog(ban.guild, AuditLogEvent.EmojiCreate))
+    if (!(await isLogging(ban.guild.id, "guildMemberPunish"))) return;
+    const auditLog: GuildAuditLogsEntry | undefined = (await getAuditLog(ban.guild, AuditLogEvent.MemberBanAdd))
         .filter((entry: GuildAuditLogsEntry) => ((entry.target! as User).id === ban.user.id))[0];
     if (!auditLog) return;
     if (auditLog.executor!.id === client.user!.id) return;
@@ -22,12 +23,12 @@
             calculateType: "guildMemberPunish",
             color: NucleusColors.red,
             emoji: "PUNISH.BAN.RED",
-            timestamp: new Date().getTime()
+            timestamp: Date.now()
         },
         list: {
             memberId: entry(ban.user.id, `\`${ban.user.id}\``),
             name: entry(ban.user.id, renderUser(ban.user)),
-            banned: entry(new Date().getTime(), renderDelta(new Date().getTime())),
+            banned: entry(Date.now(), renderDelta(Date.now())),
             bannedBy: entry(auditLog.executor!.id, renderUser(auditLog.executor!)),
             reason: entry(auditLog.reason, auditLog.reason ? `\n> ${auditLog.reason}` : "*No reason provided.*"),
             accountCreated: entry(ban.user.createdTimestamp, renderDelta(ban.user.createdTimestamp)),