Extends
- CachedManager
Members
# cache :Collection.<string, Server>
The cache of this Manager
Type:
- Collection.<string, Server>
- Source:
Methods
# (async) fetch(id, optionsopt) → {Promise.<Server>}
Fetch a FiveM server
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
id |
ServerResolvable | The server's id. Can be found in the cfx.re/join url |
|
options |
ServerFetchOptions |
<optional> |
The options to use |
- Source:
Returns:
- Type
- Promise.<Server>
Example
await client.servers.fetch('734okr')
# resolve(server) → (nullable) {Server}
Resolves a ServerResolvable to a Server object.
Parameters:
Name | Type | Description |
---|---|---|
server |
ServerResolvable | The server resolvable to identify |
- Source:
Returns:
- Type
- Server
# resolveId(server) → (nullable) {string}
Resolves a ServerResolvable to a Server id string.
Parameters:
Name | Type | Description |
---|---|---|
server |
ServerResolvable | The server resolvable to identify |
- Source:
Returns:
- Type
- string