Fetching ForumChannel threads returns ThreadChannels from all ForumChannels

I am trying to fetch threads from a specific ForumChannel, however, the ThreadChannels that are returned are not from the specified ForumChannel, but rather from every ForumChannel on the server
const forumChannel = await guild.channels.fetch('978694637088804884');
const threadChannels = await forumChannel.threads.fetch();
const forumChannel = await guild.channels.fetch('978694637088804884');
const threadChannels = await forumChannel.threads.fetch();
Here is a snippet of what is returned by threadChannels. Notice that the parentId fields are incorrect
'1147006027728965642' => ThreadChannel {
type: 11,
guild: [Guild],
guildId: '820889004055855144',
messages: [MessageManager],
members: [ThreadMemberManager],
flags: [ChannelFlagsBitField],
id: '1147006027728965642',
name: 'is this thumbnail clickable?',
parentId: '978691673842389053',
locked: false,
invitable: null,
archived: false,
autoArchiveDuration: 60,
archiveTimestamp: 1693537947352,
_createdTimestamp: 1693537947352,
ownerId: '758965903379136532',
lastMessageId: '1159043175013433374',
lastPinTimestamp: null,
rateLimitPerUser: 0,
messageCount: 4,
memberCount: 3,
totalMessageSent: 6,
appliedTags: [Array]
},
'1168586450711883847' => ThreadChannel {
type: 11,
guild: [Guild],
guildId: '820889004055855144',
messages: [MessageManager],
members: [ThreadMemberManager],
flags: [ChannelFlagsBitField],
id: '1168586450711883847',
name: 'need help repairing mp4 files',
parentId: '978553334854205450',
locked: false,
invitable: null,
archived: false,
autoArchiveDuration: 60,
archiveTimestamp: 1698683121136,
_createdTimestamp: 1698683121136,
ownerId: '244641191549730816',
lastMessageId: '1168912591482015824',
lastPinTimestamp: null,
rateLimitPerUser: 0,
messageCount: 2,
memberCount: 2,
totalMessageSent: 2,
appliedTags: []
},
'1147006027728965642' => ThreadChannel {
type: 11,
guild: [Guild],
guildId: '820889004055855144',
messages: [MessageManager],
members: [ThreadMemberManager],
flags: [ChannelFlagsBitField],
id: '1147006027728965642',
name: 'is this thumbnail clickable?',
parentId: '978691673842389053',
locked: false,
invitable: null,
archived: false,
autoArchiveDuration: 60,
archiveTimestamp: 1693537947352,
_createdTimestamp: 1693537947352,
ownerId: '758965903379136532',
lastMessageId: '1159043175013433374',
lastPinTimestamp: null,
rateLimitPerUser: 0,
messageCount: 4,
memberCount: 3,
totalMessageSent: 6,
appliedTags: [Array]
},
'1168586450711883847' => ThreadChannel {
type: 11,
guild: [Guild],
guildId: '820889004055855144',
messages: [MessageManager],
members: [ThreadMemberManager],
flags: [ChannelFlagsBitField],
id: '1168586450711883847',
name: 'need help repairing mp4 files',
parentId: '978553334854205450',
locked: false,
invitable: null,
archived: false,
autoArchiveDuration: 60,
archiveTimestamp: 1698683121136,
_createdTimestamp: 1698683121136,
ownerId: '244641191549730816',
lastMessageId: '1168912591482015824',
lastPinTimestamp: null,
rateLimitPerUser: 0,
messageCount: 2,
memberCount: 2,
totalMessageSent: 2,
appliedTags: []
},
Is this a bug or am I not understanding the use of GuildForumThreadManager#fetch()?
5 Replies
d.js toolkit
d.js toolkit14mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
duck
duck14mo ago
could you confirm that you're actually on djs 14.13.0 with npm ls discord.js?
zevnda
zevndaOP14mo ago
Well I'm actually on 14.9.0 but AFAIK the method is the same. There was no 14.9.0 tag
duck
duck14mo ago
sounds like the "earlier (update!)" tag is applicable this was a bug but has since been fixed in a later version you need to update
zevnda
zevndaOP14mo ago
Ah good to know, thanks
Want results from more Discord servers?
Add your server