The manager of roles that belong to a server member.

Example

new ServerMemberRoleManager(member);

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

This cache of the manager.

client: Client
member: ServerMember

Methods

  • Assign a role to the member.

    Returns

    The role that was added to the member.

    Example

    roles.assign(role);
    

    Parameters

    • role: number | ServerRole

      The role to add to the member.

    Returns Promise<ServerRole>

  • Fetch roles that belong to the member.

    Returns

    The fetched roles that belong to the member.

    Example

    roles.fetch();
    

    Parameters

    Returns Promise<Collection<number, ServerRole>>

  • Unassign a role from the member.

    Returns

    The role that was removed from the member.

    Example

    roles.unassign(role);
    

    Parameters

    • role: number | ServerRole

      The role to remove from the member.

    Returns Promise<ServerRole>