Represents a server member role on Guilded.

Example

new ServerMemberRole(member, rawRole);

Hierarchy

Constructors

Properties

Accessors

Methods

Constructors

  • Parameters

    • member: ServerMember

      The server member the role belongs to.

    • raw: {
          id: number;
      }

      The raw data of the role.

      • id: number
    • Optional cache: boolean

      Whether to cache the server member role.

    Returns ServerMemberRole

Properties

client: Client
id: number
member: ServerMember
raw: {
    id: number;
}

Type declaration

  • id: number
server: Server

Accessors

  • get isCached(): boolean
  • Whether the role is cached.

    Returns boolean

Methods

  • Award XP to the role.

    Example

    role.awardXp(100);
    

    Parameters

    • amount: number

      The amount of XP to award to the role.

    Returns Promise<void>

  • Remove the role from the server member.

    Returns

    The removed role.

    Example

    role.remove();
    

    Returns Promise<ServerRole>