few changes
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