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
applicationIdulongThe application's ID.
userIdulongThe Discord user ID.
externalUserIdstringThe provider-issued user ID.
usernameOptional<string>The optional external username.
dataOptional<DiscordGameProfileData>The optional complete replacement game-stat data.
cancellationTokenCancellationTokenA 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.