Table of Contents

Method UpdateCurrentUserAsync

Namespace
DSharpPlus
Assembly
DSharpPlus.dll

UpdateCurrentUserAsync(string, Optional<Stream>)

Edits current user.

public Task<DiscordUser> UpdateCurrentUserAsync(string username = null, Optional<Stream> avatar = default)

Parameters

username string

New username.

avatar Optional<Stream>

New avatar.

Returns

Task<DiscordUser>

Exceptions

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.