Constructor
new Thread(client, data, options)
- Description:
Creates the structure for a thread.
- Source:
- See:
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
client |
Client | The client instance. |
||||||||||||
data |
Object | Raw channel data. |
||||||||||||
options |
Object | Additional options for this structure. Properties
|
Extends
Members
(readonly) _cacheOptions :ChannelCacheOptions
- Description:
The cache options for this channel.
- Source:
- Overrides:
The cache options for this channel.
Type:
(readonly, nullable) guild :Guild
- Description:
The guild that this channel belongs to.
- Source:
- Overrides:
The guild that this channel belongs to.
Type:
(readonly) guildId :String
- Description:
The ID of the guild that this channel belongs to.
- Source:
- Overrides:
The ID of the guild that this channel belongs to.
Type:
- String
(readonly) id :String
- Description:
The ID of the channel.
- Source:
- Overrides:
The ID of the channel.
Type:
- String
(readonly) mention :String
- Description:
Returns the mention for this channel.
- Source:
- Overrides:
Returns the mention for this channel.
Type:
- String
(readonly) messages :ChannelMessageManager
- Description:
The messages in this channel.
- Source:
- Overrides:
The messages in this channel.
Type:
(readonly, nullable) name :String
- Description:
The name of the channel.
- Source:
- Overrides:
The name of the channel.
Type:
- String
(readonly) nsfw
- Description:
Whether this channel is marked as NSFW or not.
- Source:
- Overrides:
Whether this channel is marked as NSFW or not.
(readonly, nullable) owner :Member
- Description:
The member who created this thread.
- Source:
The member who created this thread.
Type:
(readonly) ownerId :String
- Description:
The ID of the member who created this thread.
- Source:
The ID of the member who created this thread.
Type:
- String
(readonly, nullable) parent :TextChannel
- Description:
The text channel that this thread belongs to.
- Source:
- Overrides:
The text channel that this thread belongs to.
Type:
(readonly) parentId :String
- Description:
The ID of the text channel that this thread belongs to.
- Source:
- Overrides:
The ID of the text channel that this thread belongs to.
Type:
- String
(readonly) permissionOverwrites :Array.<Object>
- Description:
The permission overwrites for this channel.
- Source:
- Overrides:
The permission overwrites for this channel.
Type:
- Array.<Object>
(readonly, nullable) rateLimitPerUser :Number
- Description:
The message send cooldown for the channel.
- Source:
- Overrides:
The message send cooldown for the channel.
Type:
- Number
(readonly, nullable) topic :String
- Description:
The topic of the channel.
- Source:
- Overrides:
The topic of the channel.
Type:
- String
(readonly) type :Number
- Description:
The type of channel.
- Source:
- Overrides:
The type of channel.
Type:
- Number
Methods
(static) shouldCache(gluonCacheOptions, guildCacheOptions) → {Boolean}
- Description:
Determines whether the thread should be cached.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
gluonCacheOptions |
GluonCacheOptions | The cache options for the client. |
guildCacheOptions |
GuildCacheOptions | The cache options for the guild. |
Returns:
- Type
- Boolean
checkPermission(member) → {String}
- Description:
Returns the permissions for a member in this channel.
- Source:
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
member |
Member | The member to check the permissions for. |
Returns:
- Type
- String
(async) send(data) → {Promise.<Message>}
- Description:
Sends a message to this channel.
- Source:
- Overrides:
- See:
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object | Embeds, components and files to include with the message. Properties
|
Throws:
Returns:
- Type
- Promise.<Message>
toJSON(format) → {Object}
- Description:
Returns the JSON representation of this structure.
- Source:
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
format |
Number | The format to return the data in. |
Returns:
- Type
- Object
toString()
- Source:
- Overrides: