Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/harmony/src/managers/roles.ts>RolesManager

An easy to use Discord API Library for Deno.
Go to Latest
class RolesManager
import { RolesManager } from "https://deno.land/x/harmony@v2.6.0/src/managers/roles.ts";

Constructors

new
RolesManager(client: Client, guild: Guild)

Methods

array(): Promise<Role[]>

Create a Guild Role

delete(role: Role | string): Promise<Role | undefined>

Delete a Guild Role

edit(role: Role | string, options: RoleModifyPayload): Promise<Role>
editPositions(...positions: Array<{ id: string | Role; position: number | null; }>): Promise<RolesManager>

Modify the positions of a set of role positions for the guild.

fetchAll(): Promise<Role[]>

Fetch All Guild Roles

fromPayload(roles: RolePayload[]): Promise<boolean>
get(key: string): Promise<Role | undefined>