Development (#11)
We need this NOW.
---------
Co-authored-by: PineaFan <ash@pinea.dev>
Co-authored-by: pineafan <pineapplefanyt@gmail.com>
Co-authored-by: PineappleFan <PineaFan@users.noreply.github.com>
Co-authored-by: Skyler <skyler3665@gmail.com>
diff --git a/src/events/emojiDelete.ts b/src/events/emojiDelete.ts
index f607cf4..c4b488e 100644
--- a/src/events/emojiDelete.ts
+++ b/src/events/emojiDelete.ts
@@ -4,8 +4,9 @@
export const event = "emojiDelete";
export async function callback(client: NucleusClient, emoji: GuildEmoji) {
- const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta, renderEmoji } = client.logger;
- const auditLog = (await getAuditLog(emoji.guild, AuditLogEvent.EmojiCreate))
+ const { getAuditLog, log, isLogging, NucleusColors, entry, renderUser, renderDelta, renderEmoji } = client.logger;
+ if (!await isLogging(emoji.guild.id, "emojiUpdate")) return;
+ const auditLog = (await getAuditLog(emoji.guild, AuditLogEvent.EmojiDelete))
.filter((entry: GuildAuditLogsEntry) => (entry.target as GuildEmoji)!.id === emoji.id)[0];
if (!auditLog) return;
if (auditLog.executor!.id === client.user!.id) return;