Constructor
new Channel(client, data, options)
- Description:
Creates the base structure for a channel.
- Source:
- See:
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
client |
Client | The client instance. |
||||||
data |
Object | Raw channel data. |
||||||
options |
Object | Additional options for this structure. Properties
|
Members
(readonly) _cacheOptions :ChannelCacheOptions
- Description:
The cache options for this channel.
- Source:
The cache options for this channel.
Type:
(readonly, nullable) guild :Guild
- Description:
The guild that this channel belongs to.
- Source:
The guild that this channel belongs to.
Type:
(readonly) guildId :String
- Description:
The ID of the guild that this channel belongs to.
- Source:
The ID of the guild that this channel belongs to.
Type:
- String
(readonly) id :String
- Description:
The ID of the channel.
- Source:
The ID of the channel.
Type:
- String
(readonly) mention :String
- Description:
Returns the mention for this channel.
- Source:
Returns the mention for this channel.
Type:
- String
(readonly) messages :ChannelMessageManager
- Description:
The messages in this channel.
- Source:
The messages in this channel.
Type:
(readonly, nullable) name :String
- Description:
The name of the channel.
- Source:
The name of the channel.
Type:
- String
(readonly) nsfw
- Description:
Whether this channel is marked as NSFW or not.
- Source:
Whether this channel is marked as NSFW or not.
(readonly, nullable) parent :Channel
- Description:
The parent channel.
- Source:
The parent channel.
Type:
(readonly, nullable) parentId :String
- Description:
The ID of the parent channel.
- Source:
The ID of the parent channel.
Type:
- String
(readonly) permissionOverwrites :Array.<Object>
- Description:
The permission overwrites for this channel.
- Source:
The permission overwrites for this channel.
Type:
- Array.<Object>
(readonly, nullable) rateLimitPerUser :Number
- Description:
The message send cooldown for the channel.
- Source:
The message send cooldown for the channel.
Type:
- Number
(readonly, nullable) topic :String
- Description:
The topic of the channel.
- Source:
The topic of the channel.
Type:
- String
(readonly) type :Number
- Description:
The type of channel.
- Source:
The type of channel.
Type:
- Number
Methods
(async, static) fetchWebhooks(client, channelId) → {Promise.<Array.<Object>>}
- Description:
Returns an array of webhooks for the specified channel.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
client |
Client | The client instance. |
channelId |
String | The ID of the channel. |
Returns:
- Type
- Promise.<Array.<Object>>
(async, static) follow(client, channelId, followChannelId) → {Promise.<void>}
- Description:
Follows a news channel.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
client |
Client | The client instance. |
channelId |
String | The ID of the channel. |
followChannelId |
String | THe ID of the channel to follow. |
Throws:
Returns:
- Type
- Promise.<void>
(static) getMention(channelId) → {String}
- Description:
Returns the mention string for a channel.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
channelId |
String | The ID of the channel to mention. |
Returns:
- Type
- String
(static) shouldCache(gluonCacheOptions, guildCacheOptions) → {Boolean}
- Description:
Determines whether the channel 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:
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:
- 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:
Parameters:
Name | Type | Description |
---|---|---|
format |
Number | The format to return the data in. |
Returns:
- Type
- Object
toString()
- Source: