diff --git a/src/events/threadDelete.ts b/src/events/threadDelete.ts
index 0077eff..bfae11a 100644
--- a/src/events/threadDelete.ts
+++ b/src/events/threadDelete.ts
@@ -2,19 +2,9 @@
 export const event = "threadDelete";
 
 export async function callback(client, thread) {
-    const {
-        getAuditLog,
-        log,
-        NucleusColors,
-        entry,
-        renderUser,
-        renderDelta,
-        renderChannel
-    } = thread.client.logger;
+    const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta, renderChannel } = thread.client.logger;
     const auditLog = await getAuditLog(thread.guild, "THREAD_UPDATE");
-    const audit = auditLog.entries
-        .filter((entry) => entry.target.id === thread.id)
-        .first();
+    const audit = auditLog.entries.filter((entry) => entry.target.id === thread.id).first();
     if (audit.executor.id === client.user.id) return;
     const data = {
         meta: {
@@ -31,9 +21,7 @@
             parentChannel: entry(thread.parentId, renderChannel(thread.parent)),
             category: entry(
                 thread.parent.parent ? thread.parent.parent.name : "None",
-                thread.parent.parent
-                    ? renderChannel(thread.parent.parent)
-                    : "None"
+                thread.parent.parent ? renderChannel(thread.parent.parent) : "None"
             ),
             autoArchiveDuration: entry(
                 thread.autoArchiveDuration,
@@ -43,14 +31,8 @@
             ),
             membersInThread: entry(thread.memberCount, thread.memberCount),
             deletedBy: entry(audit.executor.id, renderUser(audit.executor)),
-            created: entry(
-                thread.createdTimestamp,
-                renderDelta(thread.createdTimestamp)
-            ),
-            deleted: entry(
-                new Date().getTime(),
-                renderDelta(new Date().getTime())
-            )
+            created: entry(thread.createdTimestamp, renderDelta(thread.createdTimestamp)),
+            deleted: entry(new Date().getTime(), renderDelta(new Date().getTime()))
         },
         hidden: {
             guild: thread.guild.id
