Method RemoveRoleAsync
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
RemoveRoleAsync(ulong, CancellationToken)
Removes a role from this thread. Only applicable to private threads.
public Task RemoveRoleAsync(ulong roleId, CancellationToken cancellationToken = default)
Parameters
roleIdulongThe role id to be removed.
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.
RemoveRoleAsync(DiscordRole, CancellationToken)
Removes a role from this thread. Only applicable to private threads.
public Task RemoveRoleAsync(DiscordRole role, CancellationToken cancellationToken = default)
Parameters
roleDiscordRoleThe role to be removed.
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.