The manager of users that belong to the client.

Example

new UserManager(client);

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

cache: CacheCollection<string, User>

This cache of the manager.

client: Client

Methods

  • Fetch a user from a server, or cache.

    Returns

    The fetched user.

    Example

    users.fetch(server, user);
    

    Parameters

    • server: string | Server

      The server the user belongs to.

    • user: string | User

      The user to fetch.

    Returns Promise<User>

  • Fetch users from a server.

    Returns

    The fetched users.

    Example

    users.fetch(server);

    Parameters

    • server: string | Server

      The server the users belong to.

    Returns Promise<Collection<string, User>>

  • Set the maximum cache size of the manager.

    Returns

    The manager.

    Example

    manager.setMaxCache(100);
    

    Parameters

    • maxSize: number

      The maximum size of the cache.

    Returns UserManager