From ee9e3b3fb8af44a6518ac778c371e2277aaeb76f Mon Sep 17 00:00:00 2001 From: RedGuy12 Date: Mon, 12 Jun 2023 16:43:02 -0500 Subject: [PATCH] remove bloat related to https://github.com/discordjs/discord.js/pull/9568 Signed-off-by: RedGuy12 --- modules/logging/misc.ts | 4 +--- modules/modInterestForm.ts | 6 +----- modules/tickets/misc.ts | 5 +---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/modules/logging/misc.ts b/modules/logging/misc.ts index 65df21721..50beb8ae4 100644 --- a/modules/logging/misc.ts +++ b/modules/logging/misc.ts @@ -111,9 +111,7 @@ export async function getLoggingThread(group?: LogGroup | typeof DATABASE_THREAD const threads = await config.channels.modlogs.threads.fetchActive(); return ( - threads.threads.find( - (thread) => thread.parent?.id === config.channels.modlogs?.id && thread.name === group, - ) || + threads.threads.find((thread) => thread.name === group) || (await config.channels.modlogs.threads.create({ name: group, reason: "New logging thread", diff --git a/modules/modInterestForm.ts b/modules/modInterestForm.ts index f7378210a..82ddbec56 100644 --- a/modules/modInterestForm.ts +++ b/modules/modInterestForm.ts @@ -10,11 +10,7 @@ import giveXp from "./xp/giveXp.js"; if (!config.channels.admin) throw new ReferenceError("Could not find admin channel"); const threads = await config.channels.admin.threads.fetchActive(); const thread = - threads.threads.find( - (thread) => - thread.parent?.id === config.channels.admin?.id && - thread.name === "Moderator Interest Forms", - ) || + threads.threads.find((thread) => thread.name === "Moderator Interest Forms") || (await config.channels.admin.threads.create({ name: "Moderator Interest Forms", reason: "For mod interest forms", diff --git a/modules/tickets/misc.ts b/modules/tickets/misc.ts index 75a092233..d441e7d1d 100644 --- a/modules/tickets/misc.ts +++ b/modules/tickets/misc.ts @@ -19,10 +19,7 @@ export async function getThreadFromMember( return ( await asyncFilter( threads.toJSON(), - async (thread) => - thread.parent?.id === config.channels.tickets?.id && - (await getUserFromTicket(thread))?.id === user.id && - thread, + async (thread) => (await getUserFromTicket(thread))?.id === user.id && thread, ).next() ).value; }