diff --git a/src/events/emojiUpdate.ts b/src/events/emojiUpdate.ts
index 2566fed..2171b18 100644
--- a/src/events/emojiUpdate.ts
+++ b/src/events/emojiUpdate.ts
@@ -3,33 +3,35 @@
 export const event = 'emojiUpdate';
 
 export async function callback(client, oe, ne) {
-	const { getAuditLog, log, NucleusColors, entry, renderDelta, renderUser, renderEmoji } = client.logger
+    try {
+        const { getAuditLog, log, NucleusColors, entry, renderDelta, renderUser, renderEmoji } = client.logger
 
-    if (oe.name == ne.name) return
-	let auditLog = await getAuditLog(ne.guild, 'EMOJI_UPDATE');
-	let audit = auditLog.entries.first();
-    if (audit.executor.id == client.user.id) return;
+        if (oe.name == ne.name) return
+        let auditLog = await getAuditLog(ne.guild, 'EMOJI_UPDATE');
+        let audit = auditLog.entries.first();
+        if (audit.executor.id == client.user.id) return;
 
-	let changes = {
-		id: entry(ne.id, `\`${ne.id}\``),
-		emoji: entry(ne.id, renderEmoji(ne)),
-		edited: entry(ne.createdTimestamp, renderDelta(ne.createdTimestamp)),
-		editedBy: entry(audit.executor.id, renderUser((await ne.guild.members.fetch(audit.executor.id)).user)),
-		name: entry([oe.name, ne.name], `\`:${oe.name}:\` -> \`:${ne.name}:\``),
-	}
-	let data = {
-		meta:{
-			type: 'emojiUpdate',
-			displayName: 'Emoji Edited',
-			calculateType: 'emojiUpdate',
-			color: NucleusColors.yellow,
-			emoji: "GUILD.EMOJI.EDIT",
-			timestamp: audit.createdTimestamp
-		},
-		list: changes,
-		hidden: {
-			guild: ne.guild.id
-		}
-	}
-	log(data, client);
+        let changes = {
+            id: entry(ne.id, `\`${ne.id}\``),
+            emoji: entry(ne.id, renderEmoji(ne)),
+            edited: entry(ne.createdTimestamp, renderDelta(ne.createdTimestamp)),
+            editedBy: entry(audit.executor.id, renderUser((await ne.guild.members.fetch(audit.executor.id)).user)),
+            name: entry([oe.name, ne.name], `\`:${oe.name}:\` -> \`:${ne.name}:\``),
+        }
+        let data = {
+            meta:{
+                type: 'emojiUpdate',
+                displayName: 'Emoji Edited',
+                calculateType: 'emojiUpdate',
+                color: NucleusColors.yellow,
+                emoji: "GUILD.EMOJI.EDIT",
+                timestamp: audit.createdTimestamp
+            },
+            list: changes,
+            hidden: {
+                guild: ne.guild.id
+            }
+        }
+        log(data, client);
+    } catch {}
 }
\ No newline at end of file
