Still got errors and warnings, mostly the same and easy to fix
diff --git a/src/events/threadCreate.ts b/src/events/threadCreate.ts
index ef7246d..d6b9e93 100644
--- a/src/events/threadCreate.ts
+++ b/src/events/threadCreate.ts
@@ -1,34 +1,32 @@
-import humanizeDuration from 'humanize-duration';
-export const event = 'threadCreate'
+import humanizeDuration from "humanize-duration";
+export const event = "threadCreate";
export async function callback(client, thread) {
- try {
- const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta, renderChannel } = thread.client.logger
- let auditLog = await getAuditLog(thread.guild, 'THREAD_CREATE');
- let audit = auditLog.entries.filter(entry => entry.target.id === thread.id).first();
- if (audit.executor.id === client.user.id) return;
- let data = {
- meta: {
- type: 'channelCreate',
- displayName: 'Thread Created',
- calculateType: 'channelUpdate',
- color: NucleusColors.green,
- emoji: "CHANNEL.TEXT.CREATE",
- timestamp: thread.createdTimestamp
- },
- list: {
- threadId:entry(thread.id, `\`${thread.id}\``),
- name: entry(thread.name, renderChannel(thread)),
- parentChannel: entry(thread.parentId, renderChannel(thread.parent)),
- category: entry(thread.parent.parent ? thread.parent.parent.name : 'None', thread.parent.parent ? renderChannel(thread.parent.parent) : 'None'),
- autoArchiveDuration: entry(thread.autoArchiveDuration, humanizeDuration(thread.autoArchiveDuration * 60 * 1000, { round: true })),
- createdBy: entry(audit.executor.id, renderUser(audit.executor)),
- created: entry(thread.createdTimestamp, renderDelta(thread.createdTimestamp))
- },
- hidden: {
- guild: thread.guild.id
- }
+ const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta, renderChannel } = thread.client.logger;
+ const auditLog = await getAuditLog(thread.guild, "THREAD_CREATE");
+ const audit = auditLog.entries.filter(entry => entry.target.id === thread.id).first();
+ if (audit.executor.id === client.user.id) return;
+ const data = {
+ meta: {
+ type: "channelCreate",
+ displayName: "Thread Created",
+ calculateType: "channelUpdate",
+ color: NucleusColors.green,
+ emoji: "CHANNEL.TEXT.CREATE",
+ timestamp: thread.createdTimestamp
+ },
+ list: {
+ threadId:entry(thread.id, `\`${thread.id}\``),
+ name: entry(thread.name, renderChannel(thread)),
+ parentChannel: entry(thread.parentId, renderChannel(thread.parent)),
+ category: entry(thread.parent.parent ? thread.parent.parent.name : "None", thread.parent.parent ? renderChannel(thread.parent.parent) : "None"),
+ autoArchiveDuration: entry(thread.autoArchiveDuration, humanizeDuration(thread.autoArchiveDuration * 60 * 1000, { round: true })),
+ createdBy: entry(audit.executor.id, renderUser(audit.executor)),
+ created: entry(thread.createdTimestamp, renderDelta(thread.createdTimestamp))
+ },
+ hidden: {
+ guild: thread.guild.id
}
- log(data);
- } catch {}
+ };
+ log(data);
}