What can cause FetchedThreads.hasMore to be true?

Does GuildChannelManager.fetchActiveThreads have a limit or will it always fetch all threads? FetchedThreads.hasMore exists and I'm wondering what types of situations would call for multiple fetches, if any
8 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
edocsil
edocsilOP2y ago
No error, preemptive question. Hypothetical code:
guild.channels.fetchActiveThreads()
.then(fetchedThreads => console.log(fetchedThreads.hasMore))
guild.channels.fetchActiveThreads()
.then(fetchedThreads => console.log(fetchedThreads.hasMore))
What kinds of situations could cause this to be true?
monbrey
monbrey2y ago
Discord API docs dont say if there's a default limit or not, but usually these endpoints return a max of 100 entries The docs just say
whether there are potentially additional threads that could be returned on a subsequent call
So yeah Discord is pretty vague too
edocsil
edocsilOP2y ago
Alright. It doesn't have a before or after either... so if hasMore is true are we just out of luck for getting the full list without checking every channel?
Returns all active threads in the guild, including public and private threads. Threads are ordered by their id, in descending order.
https://discord.com/developers/docs/resources/guild#list-active-guild-threads
monbrey
monbrey2y ago
It has a before
monbrey
monbrey2y ago
Hmm, why dont we have that Oh, for active threads I was looking at fetch archived
edocsil
edocsilOP2y ago
Yeah maybe should have added that to the title. Only care about active in this case Cool thanks. So it has the property for fetches that can include archived threads, which can be paginated. That makes sense
Want results from more Discord servers?
Add your server