Class
DMChannel
DM / Group DM / personal notes channel.
Extends TextCapable(Channel)
Constructor
new DMChannel
(client: Client, data: APIChannelPartial & Partial<APIChannel>)| Param | Type | Description |
|---|---|---|
| client | Client | |
| data | APIChannelPartial & Partial<APIChannel> |
Properties
lastMessageId
?: string | nullID of the last message sent in this channel.
nicks
: Record<string, string>Custom nicknames for users in a group DM.
ownerId
: string | nullOwner ID for group DMs.
recipients
: User[]Recipients in this DM (includes the bot).
Methods
addRecipient
(userId: string): Promise<void>Add a user to this group DM.
| Param | Type | Description |
|---|---|---|
| userId | string |
pinInList
(): Promise<void>Pin this DM channel to the top of the DM list.
purgeMessages
(): Promise<number>Purge all messages from personal notes. Only works on personal notes channels.
removeRecipient
(userId: string, options?: { silent?: boolean; }): Promise<void>Remove a user from this group DM.
| Param | Type | Description |
|---|---|---|
| userId | string | |
| options? | { silent?: boolean; } |
unpinFromList
(): Promise<void>Unpin this DM channel from the DM list.