diff --git a/src/events/guildBanRemove.ts b/src/events/guildBanRemove.ts
index f9b427a..bcb70d5 100644
--- a/src/events/guildBanRemove.ts
+++ b/src/events/guildBanRemove.ts
@@ -1,16 +1,18 @@
-import type { GuildAuditLogsEntry, GuildBan } from "discord.js";
+import type { GuildAuditLogsEntry, GuildBan, User } from "discord.js";
+import { AuditLogEvent } from "discord.js";
 import { purgeByUser } from "../actions/tickets/delete.js";
 import type { NucleusClient } from "../utils/client.js";
 
 export const event = "guildBanRemove";
 
 export async function callback(client: NucleusClient, ban: GuildBan) {
-    purgeByUser(ban.user.id, ban.guild);
+    purgeByUser(ban.user.id, ban.guild.id);
     const { log, NucleusColors, entry, renderUser, renderDelta, getAuditLog } = client.logger;
-    const auditLog = await getAuditLog(ban.guild, "MEMBER_BAN_REMOVE");
-    const audit = auditLog.entries.filter((entry: GuildAuditLogsEntry) => entry.target!.id === ban.user.id).first();
-    if (audit.executor.id === client.user.id) return;
-    await client.database.history.create("unban", ban.guild.id, ban.user, audit.executor, audit.reason);
+    const auditLog = (await getAuditLog(ban.guild, AuditLogEvent.EmojiCreate))
+        .filter((entry: GuildAuditLogsEntry) => ((entry.target! as User).id === ban.user.id))[0];
+    if (!auditLog) return;
+    if (auditLog.executor!.id === client.user!.id) return;
+    await client.database.history.create("unban", ban.guild.id, ban.user, auditLog.executor, auditLog.reason);
     const data = {
         meta: {
             type: "memberUnban",
@@ -24,8 +26,8 @@
             memberId: entry(ban.user.id, `\`${ban.user.id}\``),
             name: entry(ban.user.id, renderUser(ban.user)),
             unbanned: entry(new Date().getTime(), renderDelta(new Date().getTime())),
-            unbannedBy: entry(audit.executor.id, renderUser(audit.executor)),
-            accountCreated: entry(ban.user.createdAt, renderDelta(ban.user.createdAt))
+            unbannedBy: entry(auditLog.executor!.id, renderUser(auditLog.executor!)),
+            accountCreated: entry(ban.user.createdTimestamp, renderDelta(ban.user.createdTimestamp))
         },
         hidden: {
             guild: ban.guild.id
