Table of Contents

Method UpdateTargetUsersAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

UpdateTargetUsersAsync(Stream, string)

Updates the target users allowed to accept an invite using a CSV stream.

public Task UpdateTargetUsersAsync(Stream targetUsersCsv, string reason = null)

Parameters

targetUsersCsv Stream

CSV stream containing a single Users column. The CSV must have a header row where the first (and only) column header is Users, and each subsequent line must contain exactly one user ID.

reason string

The audit log reason.

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.

UpdateTargetUsersAsync(IEnumerable<ulong>, string)

Updates the target users allowed to accept an invite using user ids.

public Task UpdateTargetUsersAsync(IEnumerable<ulong> targetUserIds, string reason = null)

Parameters

targetUserIds IEnumerable<ulong>

User ids allowed to accept the invite.

reason string

The audit log reason.

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.

UpdateTargetUsersAsync(IEnumerable<DiscordUser>, string)

Updates the target users allowed to accept an invite using user objects.

public Task UpdateTargetUsersAsync(IEnumerable<DiscordUser> targetUsers, string reason = null)

Parameters

targetUsers IEnumerable<DiscordUser>

Users allowed to accept the invite.

reason string

The audit log reason.

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.