Table of Contents
API reference

Method AddInviteTargetUserAsync

Namespace
DisCatSharp
Assembly
DisCatSharp.dll

AddInviteTargetUserAsync(string, ulong, CancellationToken)

Adds a target user to an existing invite.

public Task AddInviteTargetUserAsync(string inviteCode, ulong userId, CancellationToken cancellationToken = default)

Parameters

inviteCode string

The invite code.

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.

AddInviteTargetUserAsync(string, DiscordUser, CancellationToken)

Adds a target user to an existing invite.

public Task AddInviteTargetUserAsync(string inviteCode, DiscordUser user, CancellationToken cancellationToken = default)

Parameters

inviteCode string

The invite code.

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.