Table of Contents
API reference

Method AddTargetUserAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

AddTargetUserAsync(ulong, CancellationToken)

Adds a target user to an existing invite.

public Task AddTargetUserAsync(ulong userId, CancellationToken cancellationToken = default)

Parameters

userId ulong

The user id to add.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task

Exceptions

NotFoundException

Thrown when the invite does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.

AddTargetUserAsync(DiscordUser, CancellationToken)

Adds a target user to an existing invite.

public Task AddTargetUserAsync(DiscordUser user, CancellationToken cancellationToken = default)

Parameters

user DiscordUser

The user to add.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task

Exceptions

NotFoundException

Thrown when the invite does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.