Represents a server role on Guilded.

Example

new ServerRole(server, rawRole);

Hierarchy

Constructors

Properties

Accessors

Methods

Constructors

  • Parameters

    • server: Server

      The server the role belongs to.

    • raw: {
          id: number;
      }

      The raw data of the role.

      • id: number
    • Optional cache: boolean

      Whether to cache the server role.

    Returns ServerRole

Properties

client: Client
id: number
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>