Class

DMChannel

DM / Group DM / personal notes channel.

Extends TextCapable(Channel)

Constructor

new DMChannel(client: Client, data: APIChannelPartial & Partial<APIChannel>)
ParamTypeDescription
clientClient
dataAPIChannelPartial & Partial<APIChannel>

Properties

lastMessageId?: string | null

ID of the last message sent in this channel.

nicks: Record<string, string>

Custom nicknames for users in a group DM.

ownerId: string | null

Owner 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.

ParamTypeDescription
userIdstring
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.

ParamTypeDescription
userIdstring
options?{ silent?: boolean; }
unpinFromList(): Promise<void>

Unpin this DM channel from the DM list.