Method CreateDmChannelAsync
- Namespace
- DSharpPlus.Entities
- Assembly
- DSharpPlus.dll
CreateDmChannelAsync()
Creates a direct message channel to this member.
public Task<DiscordDmChannel> CreateDmChannelAsync()
Returns
- Task<DiscordDmChannel>
Direct message channel to this member.
Exceptions
- UnauthorizedException
Thrown when the member has the bot blocked, the member is no longer in the guild, 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.