Method UpdateInviteTargetUsersAsync
- Namespace
- DisCatSharp
- Assembly
- DisCatSharp.dll
UpdateInviteTargetUsersAsync(string, Stream, string)
Updates the target users allowed to accept an invite using a CSV stream.
public Task UpdateInviteTargetUsersAsync(string inviteCode, Stream targetUsersCsv, string reason = null)
Parameters
inviteCodestringThe invite code.
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.
UpdateInviteTargetUsersAsync(string, IEnumerable<ulong>, string)
Updates the target users allowed to accept an invite using user ids.
public Task UpdateInviteTargetUsersAsync(string inviteCode, IEnumerable<ulong> targetUserIds, string reason = null)
Parameters
inviteCodestringThe invite code.
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.
UpdateInviteTargetUsersAsync(string, IEnumerable<DiscordUser>, string)
Updates the target users allowed to accept an invite using user objects.
public Task UpdateInviteTargetUsersAsync(string inviteCode, IEnumerable<DiscordUser> targetUsers, string reason = null)
Parameters
inviteCodestringThe invite code.
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.