API reference
Method BulkAddInviteTargetUsersAsync
- Namespace
- DisCatSharp
- Assembly
- DisCatSharp.dll
BulkAddInviteTargetUsersAsync(string, IEnumerable<ulong>, CancellationToken)
Add multiple target users to an existing invite.
public Task BulkAddInviteTargetUsersAsync(string inviteCode, IEnumerable<ulong> targetUserIds, CancellationToken cancellationToken = default)
Parameters
inviteCodestringThe invite code.
targetUserIdsIEnumerable<ulong>The user ids to add.
cancellationTokenCancellationTokenA token to cancel the request.
Returns
Exceptions
- ArgumentException
Thrown when no valid users are provided or more than 1,000 distinct users are provided.
- 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.
BulkAddInviteTargetUsersAsync(string, IEnumerable<DiscordUser>, CancellationToken)
Adds multiple target users to an existing invite.
public Task BulkAddInviteTargetUsersAsync(string inviteCode, IEnumerable<DiscordUser> targetUsers, CancellationToken cancellationToken = default)
Parameters
inviteCodestringThe invite code.
targetUsersIEnumerable<DiscordUser>The users to add.
cancellationTokenCancellationTokenA token to cancel the request.
Returns
Exceptions
- ArgumentException
Thrown when no valid users are provided or more than 1,000 distinct users are provided.
- 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.