class GuildForumThreadManager
extends
ThreadManager<true>export class GuildForumThreadManager extends ThreadManager<true>Manages API methods for threads in forum channels and stores their cache.
readonlycache : Collection<Key, Holds>
The cache of items for this manager.
Inherited from: DataManager
channel : If<true, ForumChannel | MediaChannel, TextChannel | NewsChannel>
The channel this Manager belongs to
Inherited from: ThreadManager
readonlyholds : Constructable<Holds>
The data structure belonging to this manager.
Inherited from: DataManager
create(options: GuildForumThreadCreateOptions) : Promise<ForumThreadChannel>
Creates a new thread in the channel.
// Create a new forum post
forum.threads
.create({
name: 'Food Talk',
autoArchiveDuration: ThreadAutoArchiveDuration.OneHour,
message: {
content: 'Discuss your favorite food!',
},
reason: 'Needed a separate thread for food',
})
.then(threadChannel => console.log(threadChannel))
.catch(console.error); fetch(options: ThreadChannelResolvablecacheOptions?: BaseFetchOptions) : Promise<If<ThreadOnly, ForumThreadChannel, TextThreadChannel> | null>
Obtains a thread from Discord, or the channel cache if it's already available.
// Fetch a thread by its id
channel.threads.fetch('831955138126104859')
.then(channel => console.log(channel.name))
.catch(console.error);Returns: FetchedThreads if active & FetchedThreadsMore if archived.
fetchActive(cache?: boolean) : Promise<FetchedThreads>
Obtains all active threads in the channel.
Inherited from: ThreadManager
fetchArchived(options?: FetchArchivedThreadOptionscache?: boolean) : Promise<FetchedThreadsMore>
Obtains a set of archived threads from Discord. This method requires the PermissionFlagsBits.ReadMessageHistory permission in the parent channel.
Inherited from: ThreadManager
resolve(thread: ThreadChannelResolvable) : ThreadChannel | null
Resolves a ThreadChannelResolvable to a ThreadChannel object.
Inherited from: ThreadManager
resolveId(thread: ThreadChannelResolvable) : Snowflake | null
Resolves a ThreadChannelResolvable to a ThreadChannel id.
Inherited from: ThreadManager
valueOf() : Collection<Key, Holds>
Inherited from: DataManager