Much more typing
diff --git a/src/events/stickerUpdate.ts b/src/events/stickerUpdate.ts
index 662f981..c6e3b6e 100644
--- a/src/events/stickerUpdate.ts
+++ b/src/events/stickerUpdate.ts
@@ -1,17 +1,21 @@
+// @ts-expect-error
+import type { HaikuClient } from "jshaiku"
+import type { Sticker } from "discord.js";
+
export const event = "stickerUpdate";
-export async function callback(client, oe, ne) {
+export async function callback(client: HaikuClient, oe: Sticker, ne: Sticker) {
const { getAuditLog, log, NucleusColors, entry, renderDelta, renderUser } = client.logger;
if (oe.name === ne.name) return;
- const auditLog = await getAuditLog(ne.guild, "EMOJI_UPDATE");
+ const auditLog = await getAuditLog(ne.guild, "STICKER_UPDATE");
const audit = auditLog.entries.first();
if (audit.executor.id === client.user.id) return;
const changes = {
stickerId: entry(ne.id, `\`${ne.id}\``),
edited: entry(ne.createdTimestamp, renderDelta(ne.createdTimestamp)),
- editedBy: entry(audit.executor.id, renderUser((await ne.guild.members.fetch(audit.executor.id)).user)),
+ 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}:\``)
};
const data = {
@@ -25,7 +29,7 @@
},
list: changes,
hidden: {
- guild: ne.guild.id
+ guild: ne.guild!.id
}
};
log(data);