Table of Contents

Method GetRoleAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

GetRoleAsync(CancellationToken)

Gets the DiscordRole that is affected by this overwrite.

public Task<DiscordRole> GetRoleAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<DiscordRole>

The DiscordRole that is affected by this overwrite

Exceptions

NotFoundException

Thrown when the role does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.