Method UpdateTargetUsersAsync
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
UpdateTargetUsersAsync(Stream, string, CancellationToken)
Updates the target users allowed to accept an invite using a CSV stream.
public Task UpdateTargetUsersAsync(Stream targetUsersCsv, string reason = null, CancellationToken cancellationToken = default)
Parameters
targetUsersCsvStreamCSV stream containing a single
Userscolumn. The CSV must have a header row where the first (and only) column header isUsers, and each subsequent line must contain exactly one user ID.reasonstringThe audit log reason.
cancellationTokenCancellationTokenA token to cancel the request.
Returns
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, CancellationToken)
Updates the target users allowed to accept an invite using user ids.
public Task UpdateTargetUsersAsync(IEnumerable<ulong> targetUserIds, string reason = null, CancellationToken cancellationToken = default)
Parameters
targetUserIdsIEnumerable<ulong>User ids allowed to accept the invite.
reasonstringThe audit log reason.
cancellationTokenCancellationTokenA token to cancel the request.
Returns
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, CancellationToken)
Updates the target users allowed to accept an invite using user objects.
public Task UpdateTargetUsersAsync(IEnumerable<DiscordUser> targetUsers, string reason = null, CancellationToken cancellationToken = default)
Parameters
targetUsersIEnumerable<DiscordUser>Users allowed to accept the invite.
reasonstringThe audit log reason.
cancellationTokenCancellationTokenA token to cancel the request.
Returns
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.