Constructor
new ChannelMessageManager(client, guild, channel)
- Description:
Creates a channel message manager.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
client |
Client | The client instance. |
guild |
Guild | The guild that this message manager belongs to. |
channel |
Channel | The channel that is being managed. |
Throws:
Members
(readonly) guild :Guild
- Description:
The guild that this message manager belongs to.
- Source:
The guild that this message manager belongs to.
Type:
Methods
(async, static) fetchMessage(client, guildId, channelId, messageId) → {Message}
- Description:
Fetches a message from the channel.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
client |
Client | The client instance. |
guildId |
String | The ID of the guild. |
channelId |
String | The ID of the channel. |
messageId |
String | The ID of the message. |
Throws:
Returns:
- Type
- Message
(async, static) fetchMessages(client, guildId, channelId, options) → {Array.<Message>}
- Description:
Fetches a collection of messages from the channel.
- Source:
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
client |
Client | The client instance. |
|||||||||||||||
guildId |
String | The ID of the guild. |
|||||||||||||||
channelId |
String | The ID of the channel. |
|||||||||||||||
options |
Object | The options for fetching messages. Properties
|
Throws:
Returns:
- Type
- Array.<Message>
(static) getCacheManager(client, guildId, channelId) → {ChannelMessageManager}
- Description:
Returns the cache manager.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
client |
Client | The client instance. |
guildId |
String | The ID of the guild. |
channelId |
String | The ID of the channel. |
Throws:
Returns:
(static) getMessage(client, guildId, channelId, messageId) → {Message}
- Description:
Gets a message from the cache.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
client |
Client | The client instance. |
guildId |
String | The ID of the guild. |
channelId |
String | The ID of the channel. |
messageId |
String | The ID of the message. |
Throws:
Returns:
- Type
- Message
(async, static) purgeChannelMessages(client, channelId, messages, options) → {Promise.<void>}
- Description:
Bulk deletes channel messages.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
client |
Client | The client instance. |
channelId |
String | The id of the channel to purge messages in. |
messages |
Array.<String> | An array of message ids to delete. |
options |
Object |
Throws:
Returns:
- Type
- Promise.<void>
(async) fetch(options) → {Promise.<Array.<Message>>|Promise.<Message>}
- Description:
Fetches a collection of messages or a singular message from the channel.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | String | Either an object of options or a message id. |
Throws:
Returns:
(async) fetchPinned() → {Promise.<Array.<Message>>}
- Description:
Fetches all the pinned messages that belong to the channel.
- Source:
Returns:
- Type
- Promise.<Array.<Message>>
set(id, message) → {Message}
- Description:
Adds a message to the cache.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
id |
String | The ID of the message to cache. |
message |
Message | The message to cache. |
Throws:
Returns:
- Type
- Message