Bug fixes and ~~performance~~ typing improvements
diff --git a/src/events/emojiDelete.ts b/src/events/emojiDelete.ts
index 041b432..c4b1535 100644
--- a/src/events/emojiDelete.ts
+++ b/src/events/emojiDelete.ts
@@ -1,19 +1,9 @@
export const event = "emojiDelete";
export async function callback(client, emoji) {
- const {
- getAuditLog,
- log,
- NucleusColors,
- entry,
- renderUser,
- renderDelta,
- renderEmoji
- } = emoji.client.logger;
+ const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta, renderEmoji } = emoji.client.logger;
const auditLog = await getAuditLog(emoji.guild, "EMOJI_DELETE");
- const audit = auditLog.entries
- .filter((entry) => entry.target.id === emoji.id)
- .first();
+ const audit = auditLog.entries.filter((entry) => entry.target.id === emoji.id).first();
if (audit.executor.id === client.user.id) return;
const data = {
meta: {
@@ -28,14 +18,8 @@
emojiId: entry(emoji.id, `\`${emoji.id}\``),
emoji: entry(emoji.name, renderEmoji(emoji)),
deletedBy: entry(audit.executor.id, renderUser(audit.executor)),
- created: entry(
- emoji.createdTimestamp,
- renderDelta(emoji.createdTimestamp)
- ),
- deleted: entry(
- audit.createdTimestamp,
- renderDelta(audit.createdTimestamp)
- )
+ created: entry(emoji.createdTimestamp, renderDelta(emoji.createdTimestamp)),
+ deleted: entry(audit.createdTimestamp, renderDelta(audit.createdTimestamp))
},
hidden: {
guild: emoji.guild.id