API reference
Method GetMetadataAsync
- Namespace
- DisCatSharp.Hosting.AspNetCore.LinkedRoles
- Assembly
- DisCatSharp.Hosting.AspNetCore.dll
GetMetadataAsync(CancellationToken)
Resolves the linked-roles metadata records from the registered provider.
public Task<IReadOnlyList<DiscordApplicationRoleConnectionMetadata>> GetMetadataAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
- Task<IReadOnlyList<DiscordApplicationRoleConnectionMetadata>>
The resolved metadata records.
Remarks
Discord currently supports at most five metadata records, each with a unique key. These constraints are validated before the records are returned.
Exceptions
- InvalidOperationException
No provider is registered, more than five records were returned, or duplicate metadata keys were produced.