Much more typing
diff --git a/src/events/stickerCreate.ts b/src/events/stickerCreate.ts
index c538bde..01d6c2c 100644
--- a/src/events/stickerCreate.ts
+++ b/src/events/stickerCreate.ts
@@ -1,9 +1,13 @@
-export const event = "stickerCreate";
+// @ts-expect-error
+import type { HaikuClient } from "jshaiku"
+import type { GuildAuditLogsEntry, Sticker } from "discord.js";
-export async function callback(client, emoji) {
- const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta } = emoji.client.logger;
+export const event = "stickerDelete";
+
+export async function callback(client: HaikuClient, emoji: Sticker) {
+ const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta } = client.logger;
const auditLog = await getAuditLog(emoji.guild, "STICKER_CREATE");
- const audit = auditLog.entries.filter((entry) => entry.target.id === emoji.id).first();
+ const audit = auditLog.entries.filter((entry: GuildAuditLogsEntry) => entry.target!.id === emoji.id).first();
if (audit.executor.id === client.user.id) return;
const data = {
meta: {
@@ -21,7 +25,7 @@
created: entry(emoji.createdTimestamp, renderDelta(emoji.createdTimestamp))
},
hidden: {
- guild: emoji.guild.id
+ guild: emoji.guild!.id
}
};
log(data);