Table of Contents

Method GetActivityInstanceAsync

Namespace
DisCatSharp
Assembly
DisCatSharp.dll

GetActivityInstanceAsync(string, CancellationToken)

Validates an activity instance for the current application.

public Task<DiscordActivityInstance> GetActivityInstanceAsync(string instanceId, CancellationToken cancellationToken = default)

Parameters

instanceId string

The activity instance id to validate.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<DiscordActivityInstance>

The validated DiscordActivityInstance.

Exceptions

NotFoundException

Thrown when the activity instance does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.