diff --git a/src/events/stickerUpdate.ts b/src/events/stickerUpdate.ts
index aef28a4..c42f775 100644
--- a/src/events/stickerUpdate.ts
+++ b/src/events/stickerUpdate.ts
@@ -5,16 +5,20 @@
 
 export async function callback(client: NucleusClient, oldSticker: Sticker, newSticker: Sticker) {
     const { getAuditLog, isLogging, log, NucleusColors, entry, renderDelta, renderUser } = client.logger;
-    if (!await isLogging(newSticker.guild!.id, "stickerUpdate")) return;
+    if (!(await isLogging(newSticker.guild!.id, "stickerUpdate"))) return;
     if (oldSticker.name === newSticker.name) return;
-    const auditLog = (await getAuditLog(newSticker.guild!, AuditLogEvent.StickerUpdate))
-        .filter((entry: GuildAuditLogsEntry) => (entry.target as Sticker)!.id === newSticker.id)[0]!;
+    const auditLog = (await getAuditLog(newSticker.guild!, AuditLogEvent.StickerUpdate)).filter(
+        (entry: GuildAuditLogsEntry) => (entry.target as Sticker)!.id === newSticker.id
+    )[0]!;
     if (auditLog.executor!.id === client.user!.id) return;
 
     const changes = {
         stickerId: entry(newSticker.id, `\`${newSticker.id}\``),
         edited: entry(newSticker.createdTimestamp, renderDelta(newSticker.createdTimestamp)),
-        editedBy: entry(auditLog.executor!.id, renderUser((await newSticker.guild!.members.fetch(auditLog.executor!.id)).user)),
+        editedBy: entry(
+            auditLog.executor!.id,
+            renderUser((await newSticker.guild!.members.fetch(auditLog.executor!.id)).user)
+        ),
         name: entry([oldSticker.name, newSticker.name], `\`:${oldSticker.name}:\` -> \`:${newSticker.name}:\``)
     };
     const data = {
