Table of Contents

Method GetRoleAsync

Namespace
DSharpPlus.Entities
Assembly
DSharpPlus.dll

GetRoleAsync(ulong, bool)

Gets a singular role from this guild by its ID.

public Task<DiscordRole> GetRoleAsync(ulong roleId, bool skipCache = false)

Parameters

roleId ulong

The ID of the role.

skipCache bool

Whether to skip checking cache for the role.

Returns

Task<DiscordRole>

The role from the guild if it exists.