revbot.js
    Preparing search index...

    Class Role

    Represents a role in a server.

    Hierarchy (View Summary)

    Index

    Constructors

    • Creates a new Role instance.

      Parameters

      • server: Server

        The server this role belongs to.

      • data: {
            colour?: null | string;
            hoist?: boolean;
            name: string;
            permissions: { a: number; d: number };
            rank?: number;
        } & { id: string }

        The raw data for the role from the API.

        • Optionalcolour?: null | string

          Colour used for this role

          This can be any valid CSS colour

        • Optionalhoist?: boolean

          Whether this role should be shown separately on the member sidebar

        • name: string

          Role name

        • permissions: { a: number; d: number }

          Permissions available to this role

          • a: number

            Format: int64

            Allow bit flags

          • d: number

            Format: int64

            Disallow bit flags

        • Optionalrank?: number

          Format: int64

          Ranking of this role

        • id: string

      Returns Role

    Properties

    client: client

    The client instance.

    color: null | string = null

    The color of the role, or null if no color is set.

    hoist: boolean = false

    Whether the role is displayed separately in the member list.

    id: string

    The unique identifier for the object.

    name: string

    The name of the role.

    overwrite: Overwrite

    The permissions overwrite for the role.

    rank: number

    The rank of the role, used for ordering.

    server: Server

    The server this role belongs to.

    Accessors

    Methods

    • Updates the object with new data and returns a clone of the object.

      Parameters

      • data: PartialObject

        The data to update the object with.

      • Optionalclear: string[]

        Fields to clear in the object.

      Returns this

      A clone of the updated object.