ForumTopic<T>
Represents a forum topic
Type parameters
| Name | Type |
|---|---|
T | extends ForumChannel = ForumChannel |
Hierarchy
Base<number>↳
ForumTopic
Table of contents
Constructors
Properties
- _cachedChannel
- _cachedServer
- bumpedAt
- channelID
- client
- comments
- content
- createdAt
- createdBy
- createdByWebhookID
- id
- isLocked
- isPinned
- mentions
- serverID
- title
- updatedAt
Accessors
Methods
Constructors
constructor
• new ForumTopic<T>(data, client)
Create a new forum topic
Type parameters
| Name | Type |
|---|---|
T | extends ForumChannel<T> = ForumChannel |
Parameters
| Name | Type | Description |
|---|---|---|
data | RawForumTopic | The raw data of the forum topic |
client | Client | The client |
Overrides
Defined in
lib/structures/ForumTopic.ts:146
Properties
_cachedChannel
• Private Optional _cachedChannel: T extends TextChannel ? T : undefined
The cached channel the forum topic is in
Defined in
lib/structures/ForumTopic.ts:65
_cachedServer
• Private Optional _cachedServer: T extends Server ? Server : Server
The cached server the forum topic is in
Defined in
lib/structures/ForumTopic.ts:70
bumpedAt
• Optional bumpedAt: Date
The date the forum topic was last bumped
Defined in
lib/structures/ForumTopic.ts:75
channelID
• channelID: string
The ID of the channel the forum topic is in
Defined in
lib/structures/ForumTopic.ts:80
client
• client: Client
The bot client
Inherited from
Defined in
comments
• comments: TypedCollection<number, RawForumTopicComment, ForumTopicComment, []>
A collection of cached comments
Defined in
lib/structures/ForumTopic.ts:85
content
• content: string
The content of the forum topic
Defined in
lib/structures/ForumTopic.ts:94
createdAt
• createdAt: Date
The date the forum topic was created at
Defined in
lib/structures/ForumTopic.ts:99
createdBy
• createdBy: string
The ID of the user who created the forum topic
Defined in
lib/structures/ForumTopic.ts:104
createdByWebhookID
• Optional createdByWebhookID: string
The ID of the webhook that created the forum topic
Defined in
lib/structures/ForumTopic.ts:109
id
• id: number
The ID of the item
Inherited from
Defined in
isLocked
• Optional isLocked: boolean
Whether the forum topic is locked
Defined in
lib/structures/ForumTopic.ts:114
isPinned
• Optional isPinned: boolean
Whether the forum topic is pinned
Defined in
lib/structures/ForumTopic.ts:119
mentions
• Optional mentions: Mentions
The mentions in the forum topic
Defined in
lib/structures/ForumTopic.ts:124
serverID
• serverID: string
The ID of the server the forum topic is in
Defined in
lib/structures/ForumTopic.ts:129
title
• title: string
The title of the forum topic
Defined in
lib/structures/ForumTopic.ts:134
updatedAt
• Optional updatedAt: Date
The date the forum topic was last updated
Defined in
lib/structures/ForumTopic.ts:139
Accessors
channel
• get channel(): T extends TextChannel ? T : undefined
The channel the forum topic is in
Returns
T extends TextChannel ? T : undefined
Defined in
lib/structures/ForumTopic.ts:173
server
• get server(): T extends Server ? Server : Server
The server the forum topic is in
Returns
T extends Server ? Server : Server
Defined in
lib/structures/ForumTopic.ts:187
Methods
addReactionEmote
▸ addReactionEmote(emoteID): Promise<void>
Add a reaction emote to the forum topic
Parameters
| Name | Type | Description |
|---|---|---|
emoteID | number | The ID of the emote |
Returns
Promise<void>
Defined in
lib/structures/ForumTopic.ts:206
createComment
▸ createComment(options): Promise<ForumTopicComment>
Create a forum comment in this thread
Parameters
| Name | Type | Description |
|---|---|---|
options | ForumTopicCommentOptions | The options for the comment |
Returns
Promise<ForumTopicComment>
Defined in
lib/structures/ForumTopic.ts:219
delete
▸ delete(): Promise<void>
Delete the forum topic
Returns
Promise<void>
Defined in
lib/structures/ForumTopic.ts:233
deleteReactionEmote
▸ deleteReactionEmote(emoteID): Promise<void>
Delete a reaction emote from the forum topic
Parameters
| Name | Type | Description |
|---|---|---|
emoteID | number | The ID of the emote |
Returns
Promise<void>
Defined in
lib/structures/ForumTopic.ts:242
edit
▸ edit<T>(options): Promise<ForumTopic<T>>
Edit the forum topic
Type parameters
| Name | Type |
|---|---|
T | extends ForumChannel<T> = ForumChannel |
Parameters
| Name | Type | Description |
|---|---|---|
options | ForumTopicOptions | The options for the topic |
Returns
Promise<ForumTopic<T>>
Defined in
lib/structures/ForumTopic.ts:255
lock
▸ lock(): Promise<void>
Lock the forum topic
Returns
Promise<void>
Defined in
lib/structures/ForumTopic.ts:265
pin
▸ pin(): Promise<void>
Pin the forum topic
Returns
Promise<void>
Defined in
lib/structures/ForumTopic.ts:273
toJSON
▸ toJSON(): ForumTopicData
Returns the JSON representation of the item
Returns
Overrides
Defined in
lib/structures/ForumTopic.ts:277
unlock
▸ unlock(): Promise<void>
Unlock the forum topic
Returns
Promise<void>
Defined in
lib/structures/ForumTopic.ts:300
unpin
▸ unpin(): Promise<void>
Unpin the forum topic
Returns
Promise<void>
Defined in
lib/structures/ForumTopic.ts:308
update
▸ Protected update(data): void
Parameters
| Name | Type |
|---|---|
data | RawForumTopic |
Returns
void