get list forums
hello, I have a question if you can get the list of forums and their posts created from a discord server.
3 Replies
- 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 staffforums are channels of
type
ChannelType.GuildForum
so you can use <Guild>.channels.cache.filter()
to filter a guild's channels by <GuildChannel>.type
to receive a Collection
of forum channels
forum posts are threads, so <ForumChannel>.threads.cache
would be a collection of cached posts in a forum
<ForumChannel>.threads.fetch()
, ...fetchActive()
, and ...fetchArchived()
can be used to fetch threads from a given forum channel, but if you intend to iterate through all forums and fetch all threads, this could potentially be spammythank you very much, I will check it 😄