Creates a new DMChannel instance.
The client instance.
The raw data for the DM channel from the API.
Optional
last_message_id?: null | stringWhether the DM channel is currently active.
Readonly
clientThe client instance.
The unique identifier for the object.
The ID of the last message sent in this DM channel, if any.
Manages the messages in this DM channel.
The default permissions for the DM channel.
Readonly
typeThe type of the channel, which is always DM
for direct message channels.
Gets the timestamp (in milliseconds) when the channel was created.
The timestamp of the channel's creation.
Retrieves the last message sent in this DM channel.
The last message, or null
if no message exists.
Creates a deep clone of the object.
A clone of the object.
Updates the object with new data and returns a clone of the object.
The data to update the object with.
Optional
clear: string[]Fields to clear in the object.
A clone of the updated object.
Deletes multiple messages from this DM channel.
The messages to delete. This can be an array of message resolvables, a map of messages, or a number indicating how many recent messages to delete.
A promise that resolves when the messages have been successfully deleted.
Deletes the current channel instance from the client's channel collection.
This method interacts with the client's channel management system to remove the channel. Once deleted, the channel will no longer be accessible through the client.
A promise that resolves when the channel has been successfully deleted.
Compares this object with another to determine if they are equal.
Optional
obj: null | DMChannelThe object to compare with.
true
if the objects are equal, otherwise false
.
Checks if the channel is part of a server.
True if the channel is a server channel, otherwise false.
Checks if the channel is a group channel.
True if the channel is a group channel, otherwise false.
Checks if the channel is a text-based channel.
True if the channel is a text-based channel, otherwise false.
Checks if the channel is a voice channel.
True if the channel is a voice channel, otherwise false.
Sends a message to this DM channel.
The message content or options for the message.
A promise that resolves with the sent message.
Converts the channel to a string representation.
A string representation of the channel in the format <#channelId>
.
Represents a direct message (DM) channel between users.