Table of Contents
API reference

Method UpdateProfileAsync

Namespace
DisCatSharp
Assembly
DisCatSharp.dll

UpdateProfileAsync(ulong, ulong, string, Optional<string>, Optional<DiscordGameProfileData>, CancellationToken)

Updates an authorized user's application identity profile.

public Task UpdateProfileAsync(ulong applicationId, ulong userId, string externalUserId, Optional<string> username = default, Optional<DiscordGameProfileData> data = default, CancellationToken cancellationToken = default)

Parameters

applicationId ulong

The application's ID.

userId ulong

The Discord user ID.

externalUserId string

The provider-issued user ID.

username Optional<string>

The optional external username.

data Optional<DiscordGameProfileData>

The optional complete replacement game-stat data.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task

A task that completes when Discord accepts the update. Discord returns either 201 or 204.

Remarks

When data is supplied, it replaces the entire existing data object. Omit it to leave stats unchanged. Discord may create a profile-only identity on the first successful update.