diff --git a/modules/logging/misc.ts b/modules/logging/misc.ts index 50beb8ae4..59d1a71f5 100644 --- a/modules/logging/misc.ts +++ b/modules/logging/misc.ts @@ -108,10 +108,12 @@ export async function getLoggingThread(group?: LogGroup | typeof DATABASE_THREAD if (!config.channels.modlogs) throw new ReferenceError("Cannot find logs channel"); if (!group) return config.channels.modlogs; - const threads = await config.channels.modlogs.threads.fetchActive(); + const threads = await config.guild.channels.fetchActiveThreads(); return ( - threads.threads.find((thread) => thread.name === group) || + threads.threads.find( + (thread) => thread.parent?.id === config.channels.modlogs?.id && 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 82ddbec56..d6381a6d7 100644 --- a/modules/modInterestForm.ts +++ b/modules/modInterestForm.ts @@ -8,9 +8,13 @@ import constants from "../common/constants.js"; 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 threads = await config.guild.channels.fetchActiveThreads(); const thread = - threads.threads.find((thread) => thread.name === "Moderator Interest Forms") || + threads.threads.find( + (thread) => + thread.parent?.id === config.channels.admin?.id && + 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 d441e7d1d..74f6e91f6 100644 --- a/modules/tickets/misc.ts +++ b/modules/tickets/misc.ts @@ -14,12 +14,15 @@ export async function getThreadFromMember( ): Promise { if (!config.channels.tickets) return; - const { threads } = await config.channels.tickets.threads.fetchActive(); + const { threads } = await config.guild.channels.fetchActiveThreads(); return ( await asyncFilter( threads.toJSON(), - async (thread) => (await getUserFromTicket(thread))?.id === user.id && thread, + async (thread) => + thread.parent?.id === config.channels.tickets?.id && + (await getUserFromTicket(thread))?.id === user.id && + thread, ).next() ).value; }