API reference
Method AddInviteTargetUserAsync
- Namespace
- DisCatSharp
- Assembly
- DisCatSharp.dll
AddInviteTargetUserAsync(string, ulong, CancellationToken)
Adds a target user to an existing invite.
public Task AddInviteTargetUserAsync(string inviteCode, ulong userId, CancellationToken cancellationToken = default)
Parameters
inviteCodestringThe invite code.
userIdulongThe user id to add.
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.
AddInviteTargetUserAsync(string, DiscordUser, CancellationToken)
Adds a target user to an existing invite.
public Task AddInviteTargetUserAsync(string inviteCode, DiscordUser user, CancellationToken cancellationToken = default)
Parameters
inviteCodestringThe invite code.
userDiscordUserThe user to add.
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.