new DMChannel()
- Source:
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
lastMessageID |
Snowflake |
<nullable> |
The id of the last message sent |
recipients |
Array.<User> | An array of user recipients on the DM Channel |
Extends
Methods
createEmbed(embed) → {Promise.<Message>}
- Source:
Similar to Client#createEmbed()
Creates an embed to the channel
Parameters:
Name | Type | Description |
---|---|---|
embed |
Object | The embed to send |
Returns:
- Type
- Promise.<Message>
createMessage(content) → {Promise.<Message>}
- Source:
Similar to Client#createMessage()
Creates a message to the channel
Parameters:
Name | Type | Description |
---|---|---|
content |
String | The content of the message |
Returns:
- Type
- Promise.<Message>
getMessage(message) → {Promise.<Message>}
- Source:
Fetch a single message
If Client#storeMessages
is true, it will try to fetch the message in the cache. And if it failed
it would fetch the message through Discord's REST API And set it in the cache.
Otherwise, if it's false, it would just fetch the message through Discord's REST API
Parameters:
Name | Type | Description |
---|---|---|
message |
Snowflake | The id of the message to fetch |
Returns:
- Type
- Promise.<Message>
getMessages(options) → {Promise.<Array.<Message>>}
- Source:
Fetches messages for the channel
Parameters:
Name | Type | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Query options for fetching Message Properties
|
Returns:
- Type
- Promise.<Array.<Message>>
getPinnedMessages() → {Promise.<Array.<Message>>}
- Source:
Fetches all the pinned messages in the channel
Returns:
- Type
- Promise.<Array.<Message>>
patchEmbed(message, content) → {Promise.<Message>}
- Source:
Edits a message's embed, not content!
Parameters:
Name | Type | Description |
---|---|---|
message |
Snowflake | The id of the message to edit |
content |
String | The new embed of the message, not content! |
Returns:
- Type
- Promise.<Message>
patchMessage(message, content) → {Promise.<Message>}
- Source:
Edits a message's content, not embed!
Parameters:
Name | Type | Description |
---|---|---|
message |
Snowflake | The id of the message to edit |
content |
String | The new content of the message, not embed! |
Returns:
- Type
- Promise.<Message>