Table of Contents

Method AddDmRecipientAsync

Namespace
DSharpPlus.Entities
Assembly
DSharpPlus.dll

AddDmRecipientAsync(ulong, string, string)

Only use for Group DMs! Whitelisted bots only. Requires user's oauth2 access token

public Task AddDmRecipientAsync(ulong user_id, string accesstoken, string nickname)

Parameters

user_id ulong

The ID of the user to add.

accesstoken string

The OAuth2 access token.

nickname string

The nickname to give to the user.

Returns

Task

Exceptions

NotFoundException

Thrown when the channel does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.