Table of Contents

Method CreateDmChannelAsync

Namespace
DSharpPlus.Entities
Assembly
DSharpPlus.dll

CreateDmChannelAsync(bool)

Creates a direct message channel to this member.

public ValueTask<DiscordDmChannel> CreateDmChannelAsync(bool skipCache = false)

Parameters

skipCache bool

Returns

ValueTask<DiscordDmChannel>

Direct message channel to this member.

Exceptions

UnauthorizedException

Thrown when the member has the bot blocked, the member does not share a guild with the bot and does not have the user app installed, or if the member has Allow DM from server members off.

NotFoundException

Thrown when the member does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.