Represents a single ER:LC game server managed by a Client. Holds the server's own managers, caches, polling loop, and webhook routing.
Signature:
declare class Server#Constructors
|
Constructor |
Modifiers |
Description |
|---|---|---|
|
Creates an instance of Server. |
#Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
|
string |
Creates an authorization link for this server to allow post requests. | |
|
Manager for fetching and caching the server's ban list. | |||
|
|
The Client that manages this server. | ||
|
Manager for command execution log events. | |||
|
Manager for player caching, joining, and management actions. | |||
|
Manager for active emergency calls. | |||
|
|
boolean |
Whether the first poll attempt has completed. | |
|
|
boolean |
Returns a boolean whether the server has a queue. | |
|
|
string |
The ER:LC server ID, parsed from the server API key. | |
|
(Optional) The current server information snapshot, populated after the first successful poll. | |||
|
|
Collection<string, InGameCommand> |
A collection of in-game custom commands registered for this server only. | |
|
|
boolean |
Returns a boolean whether the server is currently full. | |
|
|
boolean |
Whether this server is currently being polled. | |
|
Manager for join and leave logs. | |||
|
|
string |
The ER:LC Server API key. | |
|
Manager for kill logs. | |||
|
Manager for moderator call logs. | |||
|
boolean |
Whether the server is currently offline (unreachable via the API). | ||
|
Manager for fetching and caching general server configuration. | |||
|
|
Pick<RestManager, 'request'> |
REST adapter bound to this server's API key. | |
|
Manager for staff members. | |||
|
Manager for spawned vehicles cache and events. |
#Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
Clears all volatile caches for this server. Called automatically when the server goes offline. | ||
|
Cleans up the server, stopping polling and clearing all caches. | ||
|
Fetches the latest server data and applies it to the caches and info snapshot. | ||
|
Registers an in-game custom command scoped to this server. | ||
|
Sends a request to the ER:LC API on behalf of this server. | ||
|
Starts polling the ER:LC API with a set poll rate, restarts the poll if one already exists. | ||
|
Stops polling the ER:LC API. | ||
|
Unregisters an in-game custom command scoped to this server. | ||
|
Waits for a specific client event to be emitted for this server. |