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
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.
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)
Updates the target users allowed to accept an invite using user ids.
public Task UpdateTargetUsersAsync(IEnumerable<ulong> targetUserIds, string reason = null)
Parameters
targetUserIdsIEnumerable<ulong>User ids allowed to accept the invite.
reasonstringThe audit log reason.
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)
Updates the target users allowed to accept an invite using user objects.
public Task UpdateTargetUsersAsync(IEnumerable<DiscordUser> targetUsers, string reason = null)
Parameters
targetUsersIEnumerable<DiscordUser>Users allowed to accept the invite.
reasonstringThe audit log reason.
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.