Table of Contents

Method GetRoleAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

GetRoleAsync(ulong, CancellationToken)

Gets a role from this guild from the api by its ID.

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

Parameters

id ulong

ID of the role to get.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<DiscordRole>

Requested role.