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

x/harmony/mod.ts>RolesManager

An easy to use Discord API Library for Deno.
Go to Latest
class RolesManager
Re-export
import { RolesManager } from "https://deno.land/x/harmony@v2.8.0/mod.ts";

Constructors

new
RolesManager(client: Client, guild: Guild)

Methods

array(): Promise<Role[]>
create(data?: CreateGuildRoleOptions): 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>