The manager of servers that belong to the client.

Example

new ServerManager(client);

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

cache: CacheCollection<string, Server>

This cache of the manager.

client: Client

Methods

  • Fetch a server from Guilded, or cache.

    Returns

    The fetched server.

    Example

    servers.fetch(server);
    

    Parameters

    • server: string | Server

      The server to fetch.

    • Optional options: FetchOptions

      The options to fetch the server with.

    Returns Promise<Server>

  • 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 ServerManager