API reference
Method AddTargetUserAsync
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
AddTargetUserAsync(ulong, CancellationToken)
Adds a target user to an existing invite.
public Task AddTargetUserAsync(ulong userId, CancellationToken cancellationToken = default)
Parameters
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.
AddTargetUserAsync(DiscordUser, CancellationToken)
Adds a target user to an existing invite.
public Task AddTargetUserAsync(DiscordUser user, CancellationToken cancellationToken = default)
Parameters
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.