Method AddMemberAsync
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
AddMemberAsync(ulong, CancellationToken)
Adds a member to this thread.
public Task AddMemberAsync(ulong memberId, CancellationToken cancellationToken = default)
Parameters
memberIdulongThe member id to be added.
cancellationTokenCancellationTokenA token to cancel the request.
Returns
Exceptions
- NotFoundException
Thrown when the thread does not exist.
- BadRequestException
Thrown when an invalid parameter was provided.
- ServerErrorException
Thrown when Discord is unable to process the request.
AddMemberAsync(DiscordMember, CancellationToken)
Adds a member to this thread.
public Task AddMemberAsync(DiscordMember member, CancellationToken cancellationToken = default)
Parameters
memberDiscordMemberThe member to be added.
cancellationTokenCancellationTokenA token to cancel the request.
Returns
Exceptions
- NotFoundException
Thrown when the thread does not exist.
- BadRequestException
Thrown when an invalid parameter was provided.
- ServerErrorException
Thrown when Discord is unable to process the request.