Class: ServerManager
Extends
BaseManager<string,Server>
Constructors
Constructor
new ServerManager(
client,limit?):ServerManager
Parameters
| Parameter | Type | Default value |
|---|---|---|
client | Client | undefined |
limit | number | Infinity |
Returns
ServerManager
Overrides
BaseManager<string, Server>.constructor
Properties
cache
cache:
Collection<string,Server>
Inherited from
BaseManager.cache
client
client:
Client
Inherited from
BaseManager.client
Methods
[custom]()
[custom]():
Collection<string,Server>
Returns
Collection<string, Server>
construct()
protectedconstruct(data):Server
Tell BaseManager how to build a Server
Parameters
| Parameter | Type |
|---|---|
data | { } |
Returns
Overrides
BaseManager.construct
edit()
edit(
serverId,options):Promise<Server>
Parameters
| Parameter | Type |
|---|---|
serverId | string |
options | ServerEditOptions |
Returns
Promise<Server>
extractId()
protectedextractId(data):string
Tell BaseManager how to find the ID for Servers
Parameters
| Parameter | Type |
|---|---|
data | { } |
Returns
string
Overrides
BaseManager.extractId
fetch()
fetch(
id,force?):Promise<Server>
Fetches a server from the API.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
id | string | undefined | The server ID. |
force | boolean | false | Whether to skip the cache and fetch from the API. |
Returns
Promise<Server>