Manages API methods for thread-based channels and stores their cache.
Extends
CachedManager<Snowflake, If<ThreadOnly, ForumThreadChannel, TextThreadChannel>, ThreadChannelResolvable>Constructs a new instance of the
ThreadManager
className | Type | Optional | Description |
---|---|---|---|
channel | TextChannel | AnnouncementChannel | ForumChannel | MediaChannel | No | None |
iterable | Iterable<RawThreadChannelData> | Yes | None |
The cache of items for this manager.
Inherited from DataManagerThe client that instantiated this Manager
Inherited from BaseManagerThe data structure belonging to this manager.
Inherited from DataManagerObtains a thread from Discord, or the channel cache if it's already available.
Returns
FetchedThreads if active & FetchedThreadsMore if archived.Example
Name | Type | Optional | Description |
---|---|---|---|
options | ThreadChannelResolvable | No | The options to fetch threads. If it is a ThreadChannelResolvable then the specified thread will be fetched. Fetches all active threads if undefined |
cacheOptions | BaseFetchOptions | Yes | Additional options for this fetch. The force field gets ignored if options is not a ThreadChannelResolvable |
Obtains all active threads in the channel.
Name | Type | Optional | Description |
---|---|---|---|
cache | boolean | Yes | Whether to cache the fetched data |
Obtains a set of archived threads from Discord. This method requires the PermissionFlagsBits.ReadMessageHistory permission in the parent channel.
Name | Type | Optional | Description |
---|---|---|---|
options | FetchArchivedThreadOptions | Yes | The options to fetch archived threads |
cache | boolean | Yes | Whether to cache the new thread objects if they aren't already |
Resolves a ThreadChannelResolvable to a object.
Name | Type | Optional | Description |
---|---|---|---|
thread | ThreadChannelResolvable | No | The ThreadChannel resolvable to resolve |
Resolves a ThreadChannelResolvable to a id.
Name | Type | Optional | Description |
---|---|---|---|
thread | ThreadChannelResolvable | No | The ThreadChannel resolvable to resolve |