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 User16mo ago
Message Not Public
Sign In & Join Server To View
edocsil
edocsil16mo 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
monbrey16mo 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
edocsil16mo 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
monbrey16mo ago
It has a before
monbrey
monbrey16mo ago
Hmm, why dont we have that Oh, for active threads I was looking at fetch archived
edocsil
edocsil16mo 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