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:
- Deprecated:
- Use DMChannel#send() instead
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:
- Deprecated:
- Use DMChannel#send() instead
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:
- Deprecated:
- Use TextChannel#patchMessage() instead.
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(options) → {Promise.<Message>}
- Source:
Edits a message
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Options for the message editing Properties
|
Returns:
- Type
- Promise.<Message>
send(options) → {Promise.<Message>}
- Source:
Sends a message to the channel
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
Returns:
- Type
- Promise.<Message>