. The thread "Git" is from a channel called resources, not forum-a. I have no idea how it got here. I have no idea why the parent id could be different.
The functions the utility calls
export async function fetch_active_threads(forum: Discord.ForumChannel) { const { threads } = await forum.threads.fetchActive(); return threads;}export async function fetch_inactive_threads_count(forum: Discord.ForumChannel, count: number) { let before: string | undefined = undefined; const thread_entries: [string, Discord.ThreadChannel][] = []; while(true) { const { threads, hasMore } = await forum.threads.fetchArchived({ before, limit: Math.min(count, 100) }); thread_entries.push(...threads); // The type annotation is needed because of a typescript bug // https://github.com/microsoft/TypeScript/issues/51115 const last: Discord.ThreadChannel = threads.last()!; before = last.id; count -= threads.size; if(!hasMore || count <= 0) { break; } } return new Discord.Collection(thread_entries);}
export async function fetch_active_threads(forum: Discord.ForumChannel) { const { threads } = await forum.threads.fetchActive(); return threads;}export async function fetch_inactive_threads_count(forum: Discord.ForumChannel, count: number) { let before: string | undefined = undefined; const thread_entries: [string, Discord.ThreadChannel][] = []; while(true) { const { threads, hasMore } = await forum.threads.fetchArchived({ before, limit: Math.min(count, 100) }); thread_entries.push(...threads); // The type annotation is needed because of a typescript bug // https://github.com/microsoft/TypeScript/issues/51115 const last: Discord.ThreadChannel = threads.last()!; before = last.id; count -= threads.size; if(!hasMore || count <= 0) { break; } } return new Discord.Collection(thread_entries);}