Table of Contents
API reference

Method RemoveInviteTargetUserAsync

Namespace
DisCatSharp
Assembly
DisCatSharp.dll

RemoveInviteTargetUserAsync(string, ulong, CancellationToken)

Removes a target user from an existing invite.

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

Parameters

inviteCode string

The invite code.

userId ulong

The user id to remove.

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.

RemoveInviteTargetUserAsync(string, DiscordUser, CancellationToken)

Removes a target user from an existing invite.

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

Parameters

inviteCode string

The invite code.

user DiscordUser

The user to remove.

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.