Fix a bunch of linter errors
diff --git a/src/events/threadDelete.ts b/src/events/threadDelete.ts
index f3a59e7..0077eff 100644
--- a/src/events/threadDelete.ts
+++ b/src/events/threadDelete.ts
@@ -2,9 +2,19 @@
export const event = "threadDelete";
export async function callback(client, thread) {
- const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta, renderChannel } = thread.client.logger;
+ const {
+ getAuditLog,
+ log,
+ NucleusColors,
+ entry,
+ renderUser,
+ renderDelta,
+ renderChannel
+ } = thread.client.logger;
const auditLog = await getAuditLog(thread.guild, "THREAD_UPDATE");
- const audit = auditLog.entries.filter(entry => entry.target.id === thread.id).first();
+ const audit = auditLog.entries
+ .filter((entry) => entry.target.id === thread.id)
+ .first();
if (audit.executor.id === client.user.id) return;
const data = {
meta: {
@@ -16,15 +26,31 @@
timestamp: new Date().getTime()
},
list: {
- threadId:entry(thread.id, `\`${thread.id}\``),
+ threadId: entry(thread.id, `\`${thread.id}\``),
name: entry(thread.name, thread.name),
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 })),
+ 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
+ })
+ ),
membersInThread: entry(thread.memberCount, thread.memberCount),
deletedBy: entry(audit.executor.id, renderUser(audit.executor)),
- created: entry(thread.createdTimestamp, renderDelta(thread.createdTimestamp)),
- deleted: entry(new Date().getTime(), renderDelta(new Date().getTime()))
+ created: entry(
+ thread.createdTimestamp,
+ renderDelta(thread.createdTimestamp)
+ ),
+ deleted: entry(
+ new Date().getTime(),
+ renderDelta(new Date().getTime())
+ )
},
hidden: {
guild: thread.guild.id