Table of Contents

Method CreateDmChannelAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

CreateDmChannelAsync()

Creates a direct message channel to this user.

public Task<DiscordDmChannel> CreateDmChannelAsync()

Returns

Task<DiscordDmChannel>

Direct message channel to this user.

Exceptions

UnauthorizedException

Thrown when the user has the bot blocked, the member shares no guild with the bot, or if the member has Allow DM from server members off.

NotFoundException

Thrown when the user does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.